This bit of code calls two separate games when the respective key is pressed. the windows appear, but the user cannot play the game. The screen is unresponsive. How do i fix this?
public void keyPressed(KeyEvent e)
{
if(e.getKeyCode() == KeyEvent.VK_1)
{
//calls tic tac toe game, and point counter
TicTacToe tic = new TicTacToe();
TicTacToeDriver.main(null);
PointCounter();
}
else if(e.getKeyCode() == KeyEvent.VK_2)
{
//calls hanman game, and point counter
Hangman hang = new Hangman();
HangmanDriver.main(null);
PointCounter();
}
}