create a dialog with a waiting message box

G

giangiammy

hi all,

I have a button which opens a window with some drawing.
I havea slow initialization phase, so I'd like to show a
dialog window with the message "initializing..."

My coinvoking code is something like:

private void doMap(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:
System.out.println("Launching Configure Maps");

// INVOCATION 1
WaitingWindowUI ww = new WaitingWindowUI("xxxxx");

// INVOCATION 2
Configuremapandsensors conf = new Configuremapandsensors();
conf.setVisible(true);
}

the proble is that if I call INVOCATION 1 (and comment out INVOCATION2)
I see my pop up window with the message, if I comment out INVOCATION1
and call just INVOCATION 2 I got my window after some seconds,
but if I call INVOCATION 1 and INVOCATION 2 I see a rectangle where
there should be my waiting message, and after some second I see
my window and the waiting message.

It seems that when I call
WaitingWindowUI ww = new WaitingWindowUI("xxxxx");

it is not shown until the window of INVOCATION 2 is complete.
What am I missing?
How can I force to show the waiting message?
Any examples of this kind?
(by the way, I tried ww.setVisible(true) or ww.show(0, with no results)

thanks
giammy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top