944,209 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1801
  • Java RSS
Aug 2nd, 2006
0

Progress messaage - wait for component to be painted...

Expand Post »
Hi!

I am writing a tool, that uses a HSQLDB database. The databases can get pretty big (the test DB is 21MB). I am using a standalone DB, so my application also acts as the DB-Server!

Here's the problem:
I want to show a message like "Loading database... Please wait!" while the DB-server restarts (on opening another DB). Unfortunately, the window containing that message doesn't paint completely (I only get a white box without content).

I also tried running threads for DB initialization and the progress window. Same result. I guess the problem is that the main thread, which paints the GUI, doesn't get any time to work, while the DB init is running.

The question:
Is there a way to wait for a component (window) to be completely painted before continuing work?

Thanks in advance!

Rotak
Similar Threads
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Rotak is offline Offline
19 posts
since May 2005
Aug 2nd, 2006
0

Re: Progress messaage - wait for component to be painted...

Are you starting a brand new Thread that implements Runnable? Or are you starting the process from a button click? Are you able to post some example code of what you're doing?
Reputation Points: 11
Solved Threads: 8
Posting Whiz in Training
hooknc is offline Offline
216 posts
since Aug 2005
Aug 2nd, 2006
0

Re: Progress messaage - wait for component to be painted...

Quote originally posted by hooknc ...
Are you starting a brand new Thread that implements Runnable? Or are you starting the process from a button click? Are you able to post some example code of what you're doing?
I implemented a new class, derived from Thread to do the work.

Opening the Database is done by a dialog. I'll clean up some code to be posted later today.
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Rotak is offline Offline
19 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Done but with errors
Next Thread in Java Forum Timeline: urgent help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC