This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes jcombobox help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jcombobox help" Watch "jcombobox help" New topic

jcombobox help

Carl John
Ranch Hand

Joined: Jun 14, 2010
Posts: 47

i'm using jcombo box in my application...

i want the end user to use only keyboard(instead of using mouse ).. so i need to display a mnenomic to use the jcombolbox like Jbutton..

please guide me to do this...

Rob Spoor

Joined: Oct 27, 2005
Posts: 19672

If I tab into a JComboBox, then press down, it opens up on my system. You can use a JLabel, with setDisplayedMnemonic and setLabelFor, to give focus to the combo box if that's what you want.

How To Ask Questions How To Answer Questions
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2176
When focus is on the combo box, you use the down arrow to display the drop down list.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: jcombobox help