public void actionPerformed(ActionEvent e) { if("firstButton".equals(event.getActionCommand())){ g.drawImage(imageArr[0], 0, 0, this) } }