i get a trouble when i write this code for a jButton to open new jfame and all that is by using the "Enter key" but it didn't work ,this the code i have writen :
if(evt.getKeyCode()==KeyEvent.VK_ENTER){
Chooser ch = new Chooser();
ch.setVisible(true);
}
So! why? Please help me and thanks.
Did You remember to add Listener for jButton ? Please give more code in Your example/ Moreover... searching in google could give interesting results: KeyListener in Textfield not firing when press enter