File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android this week in the Android 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!
I agree. Here's the link:
subject: JComboBox ??
jQuery in Action, 3rd edition