0

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

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by Rotak
0

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?

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.