Article View: borland.public.jbuilder.java.language
Article #15136How 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
63 lines
2218 bytes
2218 bytes
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 );
}
}
Technical Details
Message-ID:
<7lel8f$std8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a9b1487f8bd8fd54,start X-Google-Attributes: gidf74b3,public From: "Eric Advincula" <eric07@earthlink.net> Subject: How come I cant call this class( get it to work)? Date: 1999/06/30 Message-ID: <7lel8f$std8@forums.borland.com> X-Deja-AN: 495860957 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