File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Noneditable Combo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Noneditable Combo" Watch "Noneditable Combo" New topic

Noneditable Combo

Sridevi Sangaiah

Joined: Nov 12, 2003
Posts: 12
Hi all,

I have a noneditable combo, say with drop down values 1,2,3,4 and at one point of time, i need to have a value 5 to be selected in the combobox, but i should not add it to the combobox dropdown. Since because it is a non editable combo, i cant say setSelectedItem of a particular value which is not added to the combobox dropdown.

I require an immediate solution for this.

Thanks & Regards
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

I don't understand. You want to select a value that doesn't exist and not add it to the JComboBox?

GenRocket - Experts at Building Test Data
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
I agree. Here's the link:
subject: Noneditable Combo
jQuery in Action, 3rd edition