Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21519

Re: splash screen

Newsgroups comp.lang.java.programmer
Date 2013-01-18 07:39 -0800
References <2e28b877-c7a5-43b5-91d5-55bf0400d79e@googlegroups.com> <2m8hf8dn5va1afqngil3js5a8f08fe5c0f@4ax.com>
Message-ID <77b40be7-e4cf-470e-809f-2b00ba142469@googlegroups.com> (permalink)
Subject Re: splash screen
From bob smith <bob@coolfone.comze.com>

Show all headers | View raw


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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

splash screen bob smith <bob@coolfone.comze.com> - 2013-01-17 13:11 -0800
  Re: splash screen Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 14:22 -0800
  Re: splash screen Lew <lewbloch@gmail.com> - 2013-01-17 14:40 -0800
  Re: splash screen Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 17:18 -0800
    Re: splash screen Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 22:09 -0800
      Re: splash screen bob smith <bob@coolfone.comze.com> - 2013-01-18 12:31 -0800
        Re: splash screen Roedy Green <see_website@mindprod.com.invalid> - 2013-01-18 15:01 -0800
    Re: splash screen bob smith <bob@coolfone.comze.com> - 2013-01-18 07:39 -0800
      Re: splash screen Roedy Green <see_website@mindprod.com.invalid> - 2013-01-18 15:47 -0800

csiph-web