• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question Regarding JCombo Box Rebuilding it Dynamically from db.db

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right now I am dynamically loading the origin comboBox local connection (default) upon starting up.
When the app starts origin combo shows all origin's from db.db minus duplicates and the dest combobox shows only "any" my wild card but when a user clicks on FRA in origin combobox :it will load matches to dest combo box retaing the "any" :: roblem is, if I select FRA again it just keeps adding BOM & DAL again an again etc..
I need to refresh ComboBox>>>>>
Is there any way to refresh combo box as there is with JTable such as repaint() or setModel().
I tryed repaint() without success...
Thanks Lisa
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure why you're doing it the way you are! My instructions say that if a match isn't found, then don't display anything in the table. Sounds like you are only displaying matching dest's in the combo box to a selected orig which isn't exactly what the instructions call for. What I did was to load both orig and dest from the DB at startup and let the user decide.
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your right paul I reread the instructions I will do the same it is much easier anyways...
Also if no match I will throw up a JPaneOption Information no flight found try another search..
Do you think this will be ok???
Thanks Lisa
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That will work!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic