"Add chat room" dialog: add KeyEvent handling for ENTER key default

In the "Add chat room" dialog there's no default operation when you
press ENTER in one of the input fields. From now on pressing ENTER
will default to the "Join" button if it is enabled.
cefexperiments
Danny van Heumen 11 years ago
parent 665af40230
commit 054b0f4e89

@ -241,6 +241,10 @@ public void keyPressed(KeyEvent e)
public void keyReleased(KeyEvent e) public void keyReleased(KeyEvent e)
{ {
updateOKButtonEnableState(); updateOKButtonEnableState();
if (e.getKeyCode() == KeyEvent.VK_ENTER && okButton.isEnabled())
{
okButton.doClick();
}
} }
}; };
// when we are typing we clear any selection in the available and saved // when we are typing we clear any selection in the available and saved

Loading…
Cancel
Save