This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Progress Monitor  RSS feed

 
Barclay Berger
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to java and not real sure on how to hook up a progress monitor to an event. I'm trying to update the progress monitor as the a function runs but all I get is a blank progress monitor and never updates. I don't quite understand actionlistners etc.. so I'm sure that is what I'm missing but here is what I'm trying to do.

public void jButton1_actionPerformed(ActionEvent e) {
runupdate();
}

private void runupdate() {
ProgressMonitor prog = new ProgressMonitor(SwingLabel.this,
"Uploading Images, Please Wait...",
"", 0, 100);
prog.setNote("Uploading Images, Please Wait");
prog.setProgress(0);
prog.setNote("Uploading Image 1");
prog.setProgress(50);
prog.close();
}
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this entry in our FAQ: JProgressBar Doesnt Update
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!