Java Reference
In-Depth Information
We arrived at the installer class, invoked by the splash.jnlp extension descriptor. The Splash
class is shown in Listing 8.9.
L ISTING 8.9 The Splash class
package com.marinilli.b2.c8.splash;
import java.awt.*;
import javax.swing.*;
import javax.jnlp.*;
import java.net.URL;
/**
* Chapter 8 - Splash
* @author Mauro Marinilli
* @version 1.0
*/
public class Splash extends JWindow implements Runnable{
//class members
private ClassLoader loader;
private static ExtensionInstallerService extensionInstaller;
//graphics widgets
private JLabel ImageLabel;
20: private JLabel MessageLabel = new JLabel();
private JLabel animLabel;
private JLabel resourceLabel = new JLabel();
private static Splash splash;
//data
private String[] jarSequence= {“first.jar”, “second.jar”, “third.jar”};
private String[] msgSequence= {
“Now Even More Powerful!”,
“Incredibly Fast And Reliable!”,
“Ready To Go?”};
private String codebase = “http://server/b2/c8/splash/”;
/**
* Private Constructor - Implements the Singleton Design Pattern
*/
private Splash() {
super();
loader = getClass().getClassLoader();
//prepare UI
40: ImageLabel = new JLabel(new
ImageIcon(loader.getResource(“images/background.jpg”)));
Search WWH ::




Custom Search