Article View: borland.public.jbuilder.java.swing
Article #1550How to make splash screen using java.
From: David Huang
Date: Fri, 31 Oct 2003 06:23
Date: Fri, 31 Oct 2003 06:23
28 lines
1806 bytes
1806 bytes
I have read a article about making splash screen using java. The code like
this:
class SplashWindow1 extends JWindow
{
public SplashWindow1(String filename, Frame f)
{
super(f);
JLabel l = new JLabel(new ImageIcon(filename));
getContentPane().add(l, BorderLayout.CENTER);
pack();
Dimension screenSize =
Toolkit.getDefaultToolkit().getScreenSize();
Dimension labelSize = l.getPreferredSize();
setLocation(screenSize.width/2 - (labelSize.width/2),
screenSize.height/2 - (labelSize.height/2));
setVisible(true);
screenSize = null;
labelSize = null;
}
}
My question is how to make the instance of this class, if application is
starting without a frame how could we create this splash object.
Else what kind of paramater should we pass to the new instance of this class
Thanks
David
Technical Details
Message-ID:
<3fa1fffd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!in.100proofnews.com!in.100proofnews.com!newspeer1.nwr.nac.net!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,ff873f40940ee573,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-10-30 22:26:33 PST From: "David Huang" <dayicool@sina.com> Newsgroups: borland.public.jbuilder.java.swing Subject: How to make splash screen using java. Date: Fri, 31 Oct 2003 14:23:43 +0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 218.5.84.96 Message-ID: <3fa1fffd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067581437 218.5.84.96 (30 Oct 2003 22:23:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!in.100proofnews.com!in.100proofnews.com!newspeer1.nwr.nac.net!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail