I've created a couple of classes for managing tasks. When one or more tasks are active, a window will appear with a progress bar showing the status. There are two types of tasks: determinate tasks and indeterminate tasks. The former have a set number of steps; calling advanceProgress() will advance the counter and the progress bar. This type will automatically complete() when it reaches 100%. The latter update by a call to updateProgress(String), which will change the string used in place of the progress percentage.
This is great for monitoring file downloads! Actually, that's the reason I started this. Set each step to 1kB (filesize/1024 steps), and use "kB" for the units.
Sample use:
Task ind = TaskManager.createTask("indeterminate task");
Task det = TaskManager.createTask("determinate task", 10, "steps");
for(int i = 0; i < 10; i++) {
ind.updateProgress(Integer.toString(i));
Thread.sleep(100);
det.advanceProgress();
}
ind.complete();
http://bnubot.googlecode.com/svn/trunk/BNUBot/src/net/bnubot/util/task/