- public static void main(String[] args){
- Frame myFrame = new Frame();
- myFrame.setBounds(300, 100, GAME_WIDTH, GAME_HEIGHT);
- myFrame.setBackground(Color.BLUE);
- myFrame.setVisible(true);
- myFrame.addWindowListener(new WindowAdapter(){
- public void windowClosing(WindowEvent e) {
- System.exit(0);
- }
- });
- }