my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes problem with JCombobox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with JCombobox" Watch "problem with JCombobox" New topic

problem with JCombobox

djay djay

Joined: Sep 16, 2004
Posts: 1
I have a combobox on panel. Also I have a Jbutton 'search'with function key F2
on a dilaog. The panel where combobox is added is added on dialog
I am filling some data into the combobox.
When I select any item from combobox and click on 'search' button
then eveything works fine.
But if instead of clicking on button using mouse if I pressed F2 key
on keyboard i am getting following error message

at javax.swing.JComboBox$DefaultKeySelectionManager.selectionForKey(
at javax.swing.JComboBox.selectWithKeyChar(
at javax.swing.plaf.basic.BasicComboBoxUI$KeyHandler.keyPressed(
at java.awt.AWTEventMulticaster.keyPressed(
at java.awt.Component.processKeyEvent(
at javax.swing.JComponent.processKeyEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.processKeyEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Window.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(

Any idea to resolve this problem?
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I agree. Here's the link:
subject: problem with JCombobox
It's not a secret anymore!