This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox ??  RSS feed

 
Ranch Hand
Posts: 704
  • 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 ?
 
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try calling this method:
in JComboBox?
 
Nigel Browne
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that works!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!