splash screen

B

bob smith

What is the standard way most desktop Java programmers do a splash screen?

I know there is the class java.awt.SplashScreen, but it seems like it might be more trouble than its worth. I'm not quite sure how to do the manifest.mf business in Eclipse.
 
R

Roedy Green

What is the standard way most desktop Java programmers do a splash screen?

I know there is the class java.awt.SplashScreen, but it seems like
it might be more trouble than its worth. I'm not quite sure how to
do the manifest.mf business in Eclipse.

To do a splash screen properly, you want to get it up there very early
on in the load process.

I know of three ways to accomplish this:

1. use Java Web Start http://mindprod.com/jgloss/javawebstart.html

2. use Jet http://mindprod.com/jgloss/jet.html

3. use a C kicker to display the splash and launch the JVM.

For me splash screens are usually annoying. They force their way to
the front blocking from doing other work while the program loads.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
R

Roedy Green

What is the standard way most desktop Java programmers do a splash screen?

see http://mindprod.com/jgloss/splash.html
It documents six different techniques with sample code for most of
them.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
R

Roedy Green

It documents six different techniques with sample code for most of
them.

now seven.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
B

bob smith

On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith


who said :






see http://mindprod.com/jgloss/splash.html

It documents six different techniques with sample code for most of

them.

--

Roedy Green Canadian Mind Products http://mindprod.com

The first 90% of the code accounts for the first 90% of the development time.

The remaining 10% of the code accounts for the other 90% of the development

time.

~ Tom Cargill Ninety-ninety Law



It seems to work, but it would be nice if it centered the splash screen instead of doing this:

this.setLocation( 150, 150 );

Here's some code to center it:

int image_width = image.getWidth(null);
int image_height = image.getWidth(null);

Dimension screen_dim = Toolkit.getDefaultToolkit().getScreenSize();

this.setLocation( (screen_dim.width - image_width)/2, (screen_dim.height - image_height)/2 );
 
B

bob smith

On Thu, 17 Jan 2013 17:18:40 -0800, Roedy Green


someone who said :







now seven.

--

Roedy Green Canadian Mind Products http://mindprod.com

The first 90% of the code accounts for the first 90% of the development time.

The remaining 10% of the code accounts for the other 90% of the development

time.

~ Tom Cargill Ninety-ninety Law

Also, is it okay if I use that splash code in my project?

Thanks.
 
R

Roedy Green

Also, is it okay if I use that splash code in my project?

of course. Why do you think I posted it?
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 
R

Roedy Green

It seems to work, but it would be nice if it centered the splash screen instead of doing this:

I have reposted the code, which your improvement, implemented a
slightly different way.
--
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top