Not saying it's a perfect way but it looks simple enough to me this way:
Code:
ActionListener al = new ActionListener() { public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("New Game")) { System.out.println("New Game"); } else if (e.getActionCommand().equals("Solve"))
Leave a comment: