Article View: borland.public.jbuilder.java.language
Article #15139Re: How come I cant call this class( get it to work)?
From: Eric Advincula
Date: Wed, 30 Jun 1999 00:00
Date: Wed, 30 Jun 1999 00:00
102 lines
3838 bytes
3838 bytes
The problem is that even if I run the app in normal mode the splash screen
is still not showing up.
I put public in the constructor to no avail.
Question both classes are under the same file "SplashScreenFrame.java".
Does this work for the same when I have two classes? Or do I need to create
separate files for each class?
class SplashScreenFrame extends javax.swing.JFrame
class SD extends javax.swing.JWindow
Rich Wilkman <rwilkman@inprise.com> wrote in message
news:377AE9DE.8B9B1C5F@inprise.com...
> Eric:
>
> By default, dropping into java.lang, jfc and a whole host of other
> libraries that 99% of the time you can't change is blocked to make the
> debugging faster. Use View | Loaded Classes to change this list. More
> in the online docs.
>
> -Rich
>
> Eric Advincula wrote:
> >
> > I have this snippet of code that when I step through never goes into:
> > when I put a break point in the " class SD extends javax.swing.JWindow"
> > and when i get to the code "m_SplashWindow = new SD( this, imgSplash );"
> > it doesnt go to the break point at all in the class so its like it
bypassing
> > this class.
> > Does anyone have any ideas why?
> > Thanks
> >
> > import javax.swing.*;
> > import java.awt.*;
> >
> > public class frmMain extends javax.swing.JFrame
> >
> > private void formWindowOpened (java.awt.event.WindowEvent evt) {
> > // Add your handling code here:
> > SplashScreenFrame m_SplashScreen = new SplashScreenFrame();
> > }
> > }
> >
> > class SplashScreenFrame extends javax.swing.JFrame
> > {
> > SD m_SplashWindow;
> > Image imgSplash;
> >
> > SplashScreenFrame()
> > {
> > super();
> > Toolkit toolkit = Toolkit.getDefaultToolkit();
> > imgSplash = toolkit.getImage( "splash.gif" );
> > m_SplashWindow = new SD( this, imgSplash );
> > }
> >
> > // public static void main( String[] args )
> > // {
> > // new SplashScreenFrame().show();
> > // SplashScreenFrame m_SplashScreenFrame = new SplashScreenFrame();
> > // }
> > }
> >
> > class SD extends javax.swing.JWindow
> > {
> > Image imgSplashImg;
> >
> > SD( Frame parent, Image imgSplash )
> > {
> > super( parent );
> > imgSplashImg = imgSplash;
> > setSize( 518, 312 );
> >
> > Dimension m_ScreenDim = Toolkit.getDefaultToolkit().getScreenSize();
> > Rectangle m_Rect = getBounds();
> > setLocation( ( m_ScreenDim.width - m_Rect.width ) / 2,
> > ( m_ScreenDim.height - m_Rect.height ) / 2 );
> > setVisible( true );
> > }
> >
> > public void paint( Graphics g )
> > {
> > if( imgSplashImg != null )
> > g.drawImage( imgSplashImg, 0, 0, this );
> > }
> > }
>
> --
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Rich Wilkman
> Quality Assurance Manager
> Borland JBuilder Team
>
> If you see something that looks like an opinion up there,
> it's mine and mine alone.
>
> Mail sent to me from the newsgroups won't bounce but will
> be ignored. If I have time, I'll respond, but you have
> a better chance if you confine your posts to the newsgroups
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<7lepqb$sto6@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7lel8f$std8@forums.borland.com> <377AE9DE.8B9B1C5F@inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a9b1487f8bd8fd54 X-Google-Attributes: gidf74b3,public From: "Eric Advincula" <eric07@earthlink.net> Subject: Re: How come I cant call this class( get it to work)? Date: 1999/06/30 Message-ID: <7lepqb$sto6@forums.borland.com> X-Deja-AN: 495882020 References: <7lel8f$std8@forums.borland.com> <377AE9DE.8B9B1C5F@inprise.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.language