I am trying to implement a progress bar in my program.
Firstly, how do you center a frame(the progress bar) on the screen?
I tried frame.setLocationRelativeTo(null); //(taken from the java sun site)
But this was not recognised.
Also anyone any idea of how to calculate the length of the task because at the moment I am cheating by hard coding a fixed time.
I am using the SwingWorker class.