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 ""
  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


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.


Here's how you do it!



jla said...

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

FatButtLarry said...


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 file:

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

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