• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox keyTyped event  RSS feed

 
Meghna Prasad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is it possible to define a keyTyped event for a JComboBox. I tried adding a KeyListener for the keyTyped event to a Editable JComboBox, but this does'nt seem to work. Any ideas ?
class SymKey extends java.awt.event.KeyAdapter
{

public void keyTyped(java.awt.event.KeyEvent event)
{
Object object = event.getSource();
if (object == JComboBox1)
JComboBox1_keyTyped(event);
}
}
void JComboBox1_keyTyped(java.awt.event.KeyEvent event)
{
System.out.println("KeyTyped");

}

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!