File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Stll having problems" Watch "Stll having problems" New topic

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
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:
subject: Stll having problems
It's not a secret anymore!