Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



How to create a Splash Screen in Java?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-02-2010
DANIEL 602's Avatar
Member
 
Join Date: Jul 2006
Posts: 212
How to create a Splash Screen in Java?

I have done the basic coding in Java from which I have developed an application. Now I want to create a Splash Screen for that application. I have tried to do lot of things but was not succeeding. So thought that you guys would help me.!! Please explain me how to create a Splash Screen in Java.?? Waiting for your response.!!
__________________
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signatureto help him gain world domination
Reply With Quote
  #2  
Old 16-02-2010
Allan.d's Avatar
Member
 
Join Date: Mar 2008
Posts: 672
Re: How to create a Splash Screen in Java?

You might have observed that nowadays almost every applications have a Splash Screen. The splash screen are used for the following purposes :
  • By using the splash screen you can indicate the user that the application is launching during long startup times.
  • You can also advertise a product using the splash screen.
  • You can provide an information that is only needed once per visit.
Java Foundation Classes, both Swing and Abstract Windowing Toolkit enable a developer to create splash screens in Java technology applications.
Reply With Quote
  #3  
Old 16-02-2010
Warner's Avatar
Member
 
Join Date: Mar 2008
Posts: 349
Re: How to create a Splash Screen in Java?

Displaying a splash screen at the startup of your application is very good idea for making a user to wait for sometime till the project gets loaded. While doing this you can also advertise anything by an image on the splash scree. You can use any gif, png, or jpeg image, with transparency, translucency, and animation for displaying on the splash scree. For closing the splash screen, changing the splash-screen image, painting in the splash screen, etc. can be done by using the SplashScreen class.
Reply With Quote
  #4  
Old 16-02-2010
MELTRONICS's Avatar
Member
 
Join Date: Aug 2006
Posts: 226
Re: How to create a Splash Screen in Java?

I think that looking at the code will mke you to understand more better. The following code snippet shows how to obtain a SplashScreen object. In that I have also created a a graphics context with the createGraphics() method. So have a look on the following example :
Code:
...
        final SplashScreen spl = SplashScreen.getSplashScreen();
        if (spl == null) {
            System.out.println("SplashScreen.getSplashScreen() returned null");
            return;
        }
        Graphics2D graph = spl.createGraphics();
        if (graph == null) {
            System.out.println("graph is null");
            return;
        }
...
__________________
3.2 (northwood)
2gig ram
ATI AIW X800xt 256mb
Gigabyte GA-8knxp 875p Chipset
Optiwrite 8X DVD Burner
Win XP PRO Sp2 (Works Perfectly)
2 SATA Raptor 74gig Raid 0
2 7200 IDE 320gig HD
Reply With Quote
  #5  
Old 16-02-2010
Deabelos's Avatar
Member
 
Join Date: Jul 2006
Posts: 233
Re: How to create a Splash Screen in Java?

The coding mentioned by the 'MELTRONICS' should work. I have not checked personally but seeing at that I can tell you that it is correct, since I have done many coding for splash screen. For displaying a Splash Screen, you can also use the Command-Line Argument. To display a splash screen from the command line use the -splash: command-line argument. Its the better option to display the splash screen from the command line. The following command can be used which is a Java application launcher option that displays a splash screen :
Code:
java -splash:<file name> <class name>
__________________
IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create a Splash Screen in Java?"
Thread Thread Starter Forum Replies Last Post
HP mini 110 stuck on splash screen Dinapati Portable Devices 5 31-12-2011 07:31 AM
JAVA beginner: create a screen where i can write messages markafar Software Development 1 19-06-2011 02:00 AM
HP dv2700 boots to black screen after XP Splash Screen Deandre Operating Systems 6 05-05-2010 10:55 AM
Blank Screen after Windows XP splash screen (IBM T60 Laptop) - how todiagnost? Askar Ibragimov Windows XP Support 3 19-11-2008 08:34 PM
Win XP stuck at loading splash screen ThuG_PoeT Operating Systems 5 18-01-2008 12:37 AM


All times are GMT +5.5. The time now is 12:15 PM.