Hi, I've created a simple gui that call the game class of spaceInvaders game
http://www.cokeandcode.com/info/showsrc/showsrc.php?src=../spaceinvaders/org/newdawn/spaceinvaders/Game.javaThe problem is that I can't play the game, it doesn't reply at any key events:
this is the code from my gui where I call game:
1 2 3 4 5 6 7 8 9 10 11
| public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if( src.equals(start) ) { frameOwner.dispose(); Game game = new Game(); g.gameLoop(); } |
start is a JButton, and frameOwner is the JFrame of the GUI