aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Stll having problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Stll having problems" Watch "Stll having problems" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stll having problems
 
Similar Threads
JComboBox Help!
Thowing to many errors
why is my JTable not showing up?
Jtable cells
combining two classes