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);
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);