Jump to content
xisto Community
Sign in to follow this  
beeseven

Is It Possible To Make A Splash Screen In Java?

Recommended Posts

(A splash screen is an image that pops up before you run a program, sometimes it tells you what portion of the program is being loaded. One example that immediately comes to mind is Ad-Aware, which you should probably get if you don't have it.)Is there anything that could do this in Java? I thought about having just a JFrame with the top bar and edges hidden, but I found nothing in the API that suggests that that's possible.

Share this post


Link to post
Share on other sites

There's a program called exe4j that creates an executable program for java classes. It also allows you to create a splash screen using any image you like. I've tried the trial version before and the splash screen really works. Just google exe4j because I forgot the website already.Hey, if you're familiar with Java Net Beans, it allows you to drag and drop AWT and Swing components and also allows your programs to have splash screens. It's more expensive than exe4j but it's a really cool java development tool.

Share this post


Link to post
Share on other sites

Hi!

I also had this problem when finishing my last bigger project. Cause It's a long time since, so I don't remeber how I exactly solved this problem, but I think you should have a look at the website Javaworld. There is a tutorial for developing a splash screen with Java Swing. By the way, do you want to use Swing or AWT? They are using threads which are often not so easy, but I think the code at all is not so difficult to understand. Just have a look at it and when you have questions, simply ask!

Greets, Chris

Share this post


Link to post
Share on other sites

I was trained on Swing, and am familiar with Threads. I'll check out that site.

 

Edit after reading page:

 

Didn't think it would be that easy, the JWindow class pretty much takes care of everything except the automatic closing. Thanks for the help!

Edited by beeseven (see edit history)

Share this post


Link to post
Share on other sites

there are always alternate ways in programming <_<you can use a JWindow at startup, which is borderless compenent. Make threads to load things in background and each thread should notify JWindow for the progress. These threads will help to manipulate the JWindow.loadingbar (Which you'll create manually) ... When all threads finish loading things, close JWindow and open the mainFrame of your Application :ph34r:this is the method that i use. with out any other software.

Share this post


Link to post
Share on other sites

You can remove the title and Buttons of a frame and Dialog using setUndecorated(boolean ) 

method...Pass true and title bar will be zapped...Place an image on this frame...And Show it using a Thread...Before the application starts...

The alternative way is to use the inbuilt SplashScreen class if you are using jar files then include this header in the MANIFEST.Mf file

SplashScreen-Image: Petrol/images/petrol.Jpg

and its done

-reply by Dipesh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.