import javax.swing.JFrame;
public class GameFrame extends JFrame {
GamePanel gp;//property;
//construction method;
public GameFrame(){
this.setSize(500,500);//window size, 500 pixels;
this.setTitle(" Push the box");//Window title;
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Close
gp=new GamePanel();//Create a new drawing board
this.add(gp);
this.setVisible(true); //display
}
}
public class GameFrame extends JFrame {
GamePanel gp;//property;
//construction method;
public GameFrame(){
this.setSize(500,500);//window size, 500 pixels;
this.setTitle(" Push the box");//Window title;
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Close
gp=new GamePanel();//Create a new drawing board
this.add(gp);
this.setVisible(true); //display
}
}