sto cercando di impostare la chiusura di un jframe col tasto esc.
nn succede nulla.codice:private void formKeyPressed(java.awt.event.KeyEvent evt) { if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { System.out.println("CIAO"); this.dispose(); } }
cosa mi manca??