|
| |||||||||
| Tags: command line, graphics2d, java, jpeg image, splash screen |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| 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 |
|
#2
| ||||
| ||||
| 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 :
|
|
#3
| ||||
| ||||
| 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. |
|
#4
| ||||
| ||||
| 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 ramATI 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 |
|
#5
| ||||
| ||||
| 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.... |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |