Splash Screen based on JWindow : Splash Screen « Swing JFC « Java






Splash Screen based on JWindow

Splash Screen based on JWindow
    

//
//   SplashScreen
//
//   Copyright (C) by Andrea Carboni.
//   This file may be distributed under the terms of the LGPL license.
//


import java.awt.BorderLayout;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JWindow;

//

public class SplashScreen extends JWindow
{
  //---------------------------------------------------------------------------

  public SplashScreen(String image)
  {
    JLabel lbl = new JLabel(new ImageIcon(image));
    getContentPane().add(lbl, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(null);
    setVisible(true);
  }
}

//

   
    
    
    
  








Related examples in the same category

1.A simple application to show a title screen in the center of the screenA simple application to show a title screen in the center of the screen
2.A simple Splash screen
3.Simple splash screenSimple splash screen
4.A splash screen for an application
5.A progress bar indicating the progress of application initialization
6.Class representing an application splash screenClass representing an application splash screen
7.JSplash extends JWindow
8.SplashScreen extends JWindowSplashScreen extends JWindow