Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > splash screen

Reply
Thread Tools

splash screen

 
 
bob smith
Guest
Posts: n/a
 
      01-17-2013
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.

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      01-17-2013
On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      01-17-2013
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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-18-2013
On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
<(E-Mail Removed)> 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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-18-2013
On Thu, 17 Jan 2013 17:18:40 -0800, Roedy Green
<(E-Mail Removed)> 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
 
Reply With Quote
 
bob smith
Guest
Posts: n/a
 
      01-18-2013
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
>
> <(E-Mail Removed)> 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 );

 
Reply With Quote
 
bob smith
Guest
Posts: n/a
 
      01-18-2013
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
>
> <(E-Mail Removed)> 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.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-18-2013
On Fri, 18 Jan 2013 12:31:03 -0800 (PST), bob smith
<(E-Mail Removed)> 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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      01-18-2013
On Fri, 18 Jan 2013 07:39:35 -0800 (PST), bob smith
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla - Splash Screen Nigel Stapley Firefox 5 07-16-2004 08:42 PM
Mozilla splash screen Walter Donavan Firefox 6 07-05-2004 06:21 AM
Splash Screen adam Firefox 3 04-07-2004 06:56 PM
Turn Of the Splash Screen? Bongo Firefox 5 12-21-2003 10:53 PM
Can't change splash screen in Mozilla 1.5 Holodoc Firefox 3 11-25-2003 07:48 PM



Advertisments