3 Replies - 16475 Views - Last Post: 17 March 2011 - 07:44 AM Rate Topic: -----

#1 human_darkshadow  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-April 09

How to Make a Splash Screen with Java ?

Posted 03 April 2009 - 07:54 AM

Anybody know how to make a splash screen with Java ??
Is This A Good Question/Topic? 0
  • +

Replies To: How to Make a Splash Screen with Java ?

#2 Nat3TheGreat13  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 162
  • Joined: 09-February 09

Re: How to Make a Splash Screen with Java ?

Posted 03 April 2009 - 08:18 AM

You should try using Google.

http://java.sun.com/...lashscreen.html
Was This Post Helpful? 1
  • +
  • -

#3 shourien  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 17-March 11

Re: How to Make a Splash Screen with Java ?

Posted 17 March 2011 - 07:09 AM

There is a sample Javafx equivalent of Splash screen. However this splash screen is basically a java swing applet that is called from javafx to be displayed to the user and simulates more or less eclipse and netbeans splash screen using progress bar and titles for the loaded contents. Following is the link
http://0divides0.wor...en-with-javafx/

You must be able to get the code and separate out the splash screen code written in java swings and use it for yourself.

This is a custom java swings splash screen. and hence to center the splash screen it uses the traditional
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension labelSize = l.getPreferredSize();
setLocation(screenSize.width / 2 - (labelSize.width / 2), screenSize.height / 2 - (labelSize.height / 2));
Was This Post Helpful? 1
  • +
  • -

#4 MrLuke187  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 81
  • View blog
  • Posts: 237
  • Joined: 09-July 10

Re: How to Make a Splash Screen with Java ?

Posted 17 March 2011 - 07:44 AM

@ Nat3TheGreat13
This is a very old way of doing this.

@ human_darkshadow
You could just create a JFrame which shows the Splash (with a JProgressBar for example). You can also use those methods to make the JFrame more like a Splash:
JFrame f = new JFrame("Splash!");
// No resize
f.setResizable(false);
// No decoration (like the red x for example)
f.setUndecorated(true);
// Show the frame centered
f.setLocationRelativeTo(null);
// Make it visible
f.setVisible(true);



A big advantage of doing it like this is, that you can design it like every other JFrame and use all the LayoutManagers, etc.

Greetings: Luke

This post has been edited by MrLuke187: 17 March 2011 - 07:45 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1