0

I am writing an application which will have to regularly poll an SQL Database to get the latest entries. These entries will be translated into Java Objects and passed to the GUI which will then represent them graphically.

I have a DatabaseManager class which will query the DB as needed, but these methods don't return until after the query and translation are complete. This causes the GUI to hang immensely.

I would like to set this up to run the SQL queries in a separate thread. Could you offer any guidance?

1
  • How is your GUI implemented? Swing? Web app? Using AJAX? Commented Jun 30, 2011 at 17:00

1 Answer 1

2

See http://java.sun.com/developer/technicalArticles/javase/swingworker/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.