| Author |
Stll having problems
|
ben riches
Ranch Hand
Joined: Nov 08, 2002
Posts: 126
|
|
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
Joined: Jul 03, 2001
Posts: 2120
|
|
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.
|
SCJP2. Please Indent your code using UBB Code
|
 |
 |
|
|
subject: Stll having problems
|
|
|