Trail: Deployment
Lesson: Deployment In-Depth
Section: Deployment Toolkit
Subsection: Deploying a Java Web Start Application
Changing the Launch Button
Home Page > Deployment > Deployment In-Depth

Changing the Launch Button

You can change your Java Web Start application's Launch button image, if you don't like the default Launch button button or if you have another image that you have standardized on.

Use the deployJava.launchButtonPNG variable to point to the location of your Launch button's image.

Variable: deployJava.launchButtonPNG

Usage: Providing an alternate image URL

In this example, the Notepad application's Launch button is now an image of Duke waving.

          
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
    deployJava.launchButtonPNG='http://docs.oracle.com/javase/tutorial/images/DukeWave.gif';
    var url = "http://java.sun.com/javase/technologies/desktop/javawebstart/apps/notepad.jnlp";
    deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>

The Notepad application's new Launch button (Duke waving) follows. Click on Duke's image to launch the Notepad application.


Note:  

If you don't see the example running, you might need to enable the JavaScript interpreter in your browser so that the Deployment Toolkit script can function properly.



Problems with the examples? Try Compiling and Running the Examples: FAQs.
Complaints? Compliments? Suggestions? Give us your feedback.

Previous page: Deploying a Java Web Start Application
Next page: Deploying Without Codebase