File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox ??

 
Nigel Browne
Ranch Hand
Pie
Posts: 682
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 560
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try calling this method:
in JComboBox?
 
Nigel Browne
Ranch Hand
Pie
Posts: 682
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that works!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic