• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Stll having problems

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I am still having problems with regrds to my code. When I select the first combo box and select a table Name that begins with 0 it thows an Exception but when I reselect the combo Box to change the table Name it thows the same Exceptiomn again before I can change the table Name.
How can I get my code so that it thows the Exception only once (the first Exception) ? I have posted on this topic before so I have been looking into it, but just can not find the answer.
Please could someone help me
Thankyou
Ben
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Each time an item in the JComboBox is selected, --or if editable Enter is pressed-- an ActionEvent is fired. Thus the exception will be thrown, I guess because such table does not exist. Remove the query code from the listener and place it in a actionListener for a new button.
You are warnned against clogging the Event-Dispatching thread: place any lengthy task in another thread.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic