public static Window createSplashScreen(JFrame frame, String fileName)
throws InterruptedException {
final Image splashImage;
URL url = SwingTestHelper.class.getResource(fileName);
MediaTracker mt = new MediaTracker(frame);
splashImage = Toolkit.getDefaultToolkit().
getImage(url);
mt.addImage(splashImage, 0);
mt.waitForID(0);
Window splashScreen = new Window(frame) {
public void paint(Graphics g) {
if(splashImage != null) {
g.drawImage(splashImage, 0, 0, this);