//When using the glass pane approach, restore the old one (jgoodies or something elst may be using it)
final Component oldGlassPane = rootPane.getGlassPane();
waitPanel.addCancelListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
rootPane.setGlassPane(oldGlassPane);
rootPane.revalidate();
}
});
rootPane.setGlassPane(waitPanel.getComponent());
rootPane.revalidate();
waitPanel.start();