我想在路径中保存附件,例如:
RAILS_ROOT /父/:id_parent /子/:id_child /:文件名
package javagame2;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JFrame;
import static javax.swing.text.StyleConstants.setBackground;
public class JavaGame2 extends JFrame {
public JavaGame2(){
setTitle("My Game");
setSize(250,250);
setBackground(Color.YELLOW);
setResizable(false);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void paint(Graphics g){
g.drawString("Hello World", 75, 75);
}
public static void main(String[] args) {
new JavaGame2();
}
}
我如何使用:id_parent?因为现在是未定义的,它应该有父ID值。