Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > progressmonitor while initializing GUI

Reply
Thread Tools

progressmonitor while initializing GUI

 
 
kaith
Guest
Posts: n/a
 
      10-07-2003
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);
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
skipping a structure member while initializing Mik0b0 C Programming 12 04-15-2007 08:13 AM
compiling errors while initializing a structure has function pointers as members rashmi C Programming 2 09-20-2005 03:56 PM
GUI - GUI value passing paul.foreman Java 5 10-25-2004 08:06 AM
Escape key in ProgressMonitor dominic Java 0 10-15-2004 03:41 AM
Error occurred while initializing MAPI in Outlook Express 6 Michael MCSE 5 09-17-2003 05:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57