KEYLISTNER FOR EDITABLE COMBOBOX
//i have created this combobox:
JComboBox o_String= new JComboBox();
// and added a keylistner this way:
o_String.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(KeyEvent ke) {
o_String_keyReleased(ke);
}
public void keyPressed(KeyEvent ke) {
o_String_keyPressed(ke);
}
});
//with these functions
void o_String_keyReleased(KeyEvent ke)
{
if (ke.getKeyCode() == KeyEvent.VK_F12
System.out.print("F12");
}
void o_String_keyPressed(KeyEvent ke)
{
if (ke.getKeyCode() == KeyEvent.VK_F1)
System.out.print("F1");
}
//but it doesn't work..any one can tell me where is the problem?
// i wanna do somtning when i press F1 or F12 ,,,

