It worked fine for me, does the dialog box show up?
Here is what I used to test it.
CODE
package base;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import util.*;
import listeners.*;
public class Tester
{
private static JFrame f;
private static JButton b;
private static void makeGui()
{
f = new JFrame("Testing a busybox");
b = new JButton("close");
f.setSize(new Dimension(300,300));
b.addActionListener(new Buttons(f));
f.addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){System.exit(0);}});
f.add(b);
f.setVisible(true);
}
public static void main(String[] args)
{
makeGui();
BusyBox busyBox = new BusyBox(f, "Processing", "Please wait...");
busyBox.showMessage();
for(int i=0;i<100000;i++){ System.out.println(i); }
// some heavy processing code here
busyBox.done();
}
}
The import util was the package I stuck your busybox in and the import listeners is just used for the system exit on the button.
I just copy/pasted the busybox in, the only thing I added was 2 imports for swing.* and awt.*