splash screen

Discussion in 'Java' started by bob smith, Jan 17, 2013.

  1. bob smith

    bob smith Guest

    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.
     
    bob smith, Jan 17, 2013
    #1
    1. Advertising

  2. bob smith

    Roedy Green Guest

    On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
    <> 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
     
    Roedy Green, Jan 17, 2013
    #2
    1. Advertising

  3. bob smith

    Lew Guest

    Lew, Jan 17, 2013
    #3
  4. bob smith

    Roedy Green Guest

    On Thu, 17 Jan 2013 13:11:31 -0800 (PST), bob smith
    <> 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, Jan 18, 2013
    #4
  5. bob smith

    Roedy Green Guest

    On Thu, 17 Jan 2013 17:18:40 -0800, Roedy Green
    <> 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
     
    Roedy Green, Jan 18, 2013
    #5
  6. bob smith

    bob smith Guest

    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
    >
    > <> 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, Jan 18, 2013
    #6
  7. bob smith

    bob smith Guest

    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
    >
    > <> 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.
     
    bob smith, Jan 18, 2013
    #7
  8. bob smith

    Roedy Green Guest

    On Fri, 18 Jan 2013 12:31:03 -0800 (PST), bob smith
    <> 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, Jan 18, 2013
    #8
  9. bob smith

    Roedy Green Guest

    On Fri, 18 Jan 2013 07:39:35 -0800 (PST), bob smith
    <> 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
     
    Roedy Green, Jan 18, 2013
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Jausovec

    Re: creating Dyanamic splash screen

    Peter Jausovec, Mar 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    534
    Peter Jausovec
    Mar 12, 2005
  2. Frank
    Replies:
    0
    Views:
    489
    Frank
    Mar 12, 2005
  3. CodeMonkey
    Replies:
    0
    Views:
    410
    CodeMonkey
    Oct 11, 2005
  4. =?Utf-8?B?UnVkeQ==?=

    An upload splash screen?

    =?Utf-8?B?UnVkeQ==?=, Jul 7, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    622
    John Timney \(ASP.NET MVP\)
    Jul 10, 2005
  5. Glenn McCall

    A splash screen

    Glenn McCall, Dec 15, 2003, in forum: Java
    Replies:
    11
    Views:
    2,680
    DreamCoder
    Dec 16, 2003
Loading...

Share This Page