progressmonitor while initializing GUI

K

kaith

I want to put my GUI initialization code inside a invokelater block so
that I can post a progressMonitor while that code is executing. The
problem is it requires the variable to be declared final, but I can't
do that since I am initializing the variable inside the block How can
I get around this problem. Following is my code.

func one {
final ProgressMonitor pm = new ProgressMonitor(null, "Initalizing",
"Initlaizeing", 0, 100);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
pm.setProgress(10);
}
});
..
..
..
//// This is the code I want to put inside invoke later also.
window = new MyWindow(frame, this, menu, id);
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top