Apache Beehive 1.0 Java Install: First NetBeans, now Google Toolbar?
Oct 04

Splashing around quickly with Mustang

Java, Tech Add comments

Out of the corner of my eye I saw New Splash-Screen Functionality in Mustang, and how you can get a splash image up even BEFORE the JVM is started.

You can set a splash filename via:

java -splash:filename.gif SplashTest

or set it up in a jar manifest:

Manifest-Version: 1.0
Main-Class: SplashTest
SplashScreen-Image: filename.gif

And, of course you will often want to do more than just show an image, you may want to overlay a progress bar:

SplashScreen splash = SplashScreen.getSplashScreen();
Graphics2D g = (Graphics2D)splash.getGraphics();
Dimension size = splash.getDimension();
g.setComposite(AlphaComposite.Clear);
g.fillRect(0, 0, size.width, size.height);
g.setPaintMode();

I can’t wait to see the new splash images show up in Mustang based Java apps of the future :)

One Response to “Splashing around quickly with Mustang”

  1. Anonymous Says:

    Hey, why the sarcasm? ;-)

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'cricket'