Wednesday, April 16, 2008

NetBeans 6 Splash Screen

Update: 11/11/2010

This tutorial should still work on Netbeans 6.9.1+

The original thread link is broken thanks to Oracle taking over Sun's message boards, so this link is the best reference for now.

  1. Open NetBeans
  2. File, New, Java Desktop Application
  3. In the "Projects" area, click "Files"
  4. Locate the file in your main project called "manifest.mf"
  5. Double click it.  It should open automatically in the source editor window
  6. Add a new line to the bottom of the file:
    SplashScreen-Image: /package1/package2/filename.gif
  7. This image file can be located inside your JAR
  8. Perform a clean build of your project and run the JAR by itself.  The splash screen should now show while your application is launching.
  9. This new splash image can be JPEG, GIF, PNG, BMP and supports transparency for PNG an GIF






OLD POST BELOW






This is not for branding NetBeans, but rather for adding a standard splash screen to your application.

What do I mean?

NetBeans offers an option in your project properties to automatically load a splash screen.

IT DOESN'T WORK

Here's how you do it!

http://forum.java.sun.com/thread.jspa?messageID=10208126&#10208126

-Tres

2 comments:

Unknown said...

Dead link, and I'm having no luck finding it via the message number. It might be too old to find.

Tres Finocchiaro said...

From http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/splashscreen/

There are two ways to show the native splash screen:

If your application is run from the command line or from a shortcut, use the -splash: Java application launcher option to show a splash screen:

java -splash:filename.gif SplashTest

If your application is packaged in a JAR file, you can use the SplashScreen-Image option in a manifest file to show a splash screen. Place the image in the JAR archive and specify the path in the option. For example, use this code in the manifest.mf file:

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

The command-line interface has precedence over the manifest setting.