View Single Post
  #2 (permalink)  
Old 10-30-2007, 07:16 AM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
public SpaceGame(int width, int height){ ... addKeyListener(new MyKeyListener()); // Keyboard input requires the listening component to have the focus. setFocusable(true); new Thread(this).start(); ... public static void main(String [] args){ ... frame.add(g); // This should be last for proper/complete initialization. frame.setVisible(true);
Reply With Quote