7172737475767778798081
public void keyTyped(KeyEvent e) { } public void keyPressed(KeyEvent e) { btn.setBackground(Color.BLACK); btn.repaint(); } public void keyReleased(KeyEvent e) { btn.setBackground(Color.WHITE); btn.repaint();
7677787980818283848586
btn.repaint(); } public void keyReleased(KeyEvent e) { btn.setBackground(Color.WHITE); btn.repaint(); } }); btnPanel.add(btn); }