Sunday, October 21, 2007

SplashScreen for impatient Users :)

One more API in Java for those who are impatient in handling Java Application. A heavy application in Java takes time before starting up and hence JDK6 comes with a concept of SplashScreen. Its a simple class in JDK6 where user can show a screen on top of his application screen(before it getting start) that ,be patient, application will run in few seconds. Good part, it also supports gif image, so for completely impatient user who generally starts clicking here and there :D and screwing application, show a GIF image of progress bar.

It comes in various flavors:

- SplashScreen stay on the desktop till the main screen(application UI) will not come. Some polling or signal mechanism internally, I never bothered to see the code :D

- SplashScreen stay for given amount of time. A simple one.

Running is not an easy job. You have to define splash option with java

java -splash:imagename classname

I guess a good API for those who make games or some big application. One can give information like Copyright, Developer name, Loading..., Company name, etc etc. I mean generally for these information we waste one screen in our main application itself, why not use SplashScreen for that :).

You can see some sample code here:

http://www.devdaily.com/java/edu/SplashScreen/SplashScreenMain.java
http://java.sun.com/docs/books/tutorial/uiswing/misc/splashscreen.html

No comments: