This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes 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 » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "JComboBox ??" Watch "JComboBox ??" New topic

JComboBox ??

Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
I have managed to populate a JComboBox dynamically. Using the following I create the combo:
originAirports is a Vector of distinct values from col 2 in the database.
Unfortunately the combo always shows "SFO" as the first value. Why when I have asked to place "Any" at a specific index "0" and then called that index, is the value still not displayed as the default alternative ?
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Can you try calling this method:
in JComboBox?
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Thanks, that works!
wood burning stoves
subject: JComboBox ??
jQuery in Action, 3rd edition