List of usage examples for java.awt MediaTracker LOADING
int LOADING
To view the source code for java.awt MediaTracker LOADING.
Click Source Link
From source file:org.colombbus.tangara.Main.java
/** * Displays splash.png during the loading *///from ww w. ja v a2s .c om private static void displaySplashScreen() { URL url = SplashScreen.class.getResource("splash.png"); splashScreenImage = new ImageIcon(url); // while the image is not on screen while (splashScreenImage.getImageLoadStatus() == MediaTracker.LOADING) { try { Thread.sleep(1000); } catch (InterruptedException e) { LOG.debug("splash screen loading interrupted", e); //$NON-NLS-1$ } } // should normally be run in the EDT, but launched at once in order to // display // the screen as soon as possible new SplashScreen(splashScreenImage, 3000); }