Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   splash screen (http://www.velocityreviews.com/forums/t956627-splash-screen.html)

bob smith 01-17-2013 09:11 PM

splash screen
 
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.


Roedy Green 01-17-2013 10:22 PM

Re: splash screen
 
On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>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

Lew 01-17-2013 10:40 PM

Re: splash screen
 
bob smith wrote:
> I'm not quite sure how to do the manifest.mf business in Eclipse.


What do you mean by "the manifest.mf [sic] business"?

Are you referring to the steps documented in
http://help.eclipse.org/juno/index.j...2Ftasks-35.htm
or something else?

--
Lew

Roedy Green 01-18-2013 01:18 AM

Re: splash screen
 
On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>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

Roedy Green 01-18-2013 06:09 AM

Re: splash screen
 
On Thu, 17 Jan 2013 17:18:40 -0800, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>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

bob smith 01-18-2013 03:39 PM

Re: splash screen
 
On Thursday, January 17, 2013 7:18:40 PM UTC-6, Roedy Green wrote:
> On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
>
> <bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
>
> who said :
>
>
>
> >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




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 );


bob smith 01-18-2013 08:31 PM

Re: splash screen
 
On Friday, January 18, 2013 12:09:20 AM UTC-6, Roedy Green wrote:
> On Thu, 17 Jan 2013 17:18:40 -0800, Roedy Green
>
> <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
>
> someone who said :
>
>
>
> >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


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

Thanks.

Roedy Green 01-18-2013 11:01 PM

Re: splash screen
 
On Fri, 18 Jan 2013 12:31:03 -0800 (PST), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>
>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

Roedy Green 01-18-2013 11:47 PM

Re: splash screen
 
On Fri, 18 Jan 2013 07:39:35 -0800 (PST), bob smith
<bob@coolfone.comze.com> wrote, quoted or indirectly quoted someone
who said :

>
>
>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


All times are GMT. The time now is 06:32 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.