progressmonitor while initializing GUI

Discussion in 'Java' started by kaith, Oct 7, 2003.

  1. kaith

    kaith Guest

    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);
    kaith, Oct 7, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dominic

    Escape key in ProgressMonitor

    dominic, Oct 15, 2004, in forum: Java
    Replies:
    0
    Views:
    396
    dominic
    Oct 15, 2004
  2. paul.foreman

    GUI - GUI value passing

    paul.foreman, Oct 22, 2004, in forum: Java
    Replies:
    5
    Views:
    747
    Michael Rauscher
    Oct 25, 2004
  3. ulysses
    Replies:
    4
    Views:
    764
    Werner Schiendl
    Oct 22, 2003
  4. rashmi
    Replies:
    2
    Views:
    466
    Lawrence Kirby
    Sep 20, 2005
  5. Mik0b0
    Replies:
    12
    Views:
    510
    David Thompson
    Apr 15, 2007
Loading...

Share This Page