Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stll having problems

 
ben riches
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • 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
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic