I'm having trouble figuring this out. I would normally just do something like
JButton blah = new JButton("blah"); String str = e.getActionCommand(); if(str.equals("blah") { //do something }
but now I'm using an icon for the JButton instead of text.
ImageIcon createIcon = new ImageIcon("images/new.png"); JButton create = new JButton(createIcon); create.addActionListener(new EventHandler());
what would I do in the eventhandler class?