Article View: borland.public.jbuilder.java.language
Article #15303Re: Swing
From: MJR
Date: Wed, 23 Jun 1999 00:00
Date: Wed, 23 Jun 1999 00:00
40 lines
2458 bytes
2458 bytes
I installed the plug-in but still no luck. Let me give some more details
about the error I'm getting. The following program works (a frame with the
label "worked" pops up):
import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class Test extends Applet {
public void init()
JComboBox jb;
Frame f = new Frame();
f.add( "Center", new Label( "worked" ) );
f.setSize( 400, 100 );
f.setVisible( true );
}
}
But the following does not work (no frame pops up, and I get the error
NoClassDefFoundError: javax/swing/JComboBox) :
import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class Test extends Applet {
public void init()
JComboBox jb = new JComboBox();
Frame f = new Frame();
f.add( "Center", new Label( "worked" ) );
f.setSize( 400, 100 );
f.setVisible( true );
}
}
I'm not sure why I'm able to declare swing classes but not actually create
them.
Technical Details
Message-ID:
<7kric9$962$1@mailint03.im.hou.compaq.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7kr9ep$j1j$1@mailint03.im.hou.compaq.com> <7krbf2$nem$1@mailint03.im.hou.compaq.com> <7krf2k$7kl$1@nntp3.atl.mindspring.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d6b,9cfed302216836dc X-Google-Attributes: gid111d6b,public X-Google-Thread: 113ae9,9cfed302216836dc X-Google-Attributes: gid113ae9,public X-Google-Thread: fecd1,9cfed302216836dc X-Google-Attributes: gidfecd1,public X-Google-Thread: fa45f,9cfed302216836dc X-Google-Attributes: gidfa45f,public X-Google-Thread: f5d71,9cfed302216836dc X-Google-Attributes: gidf5d71,public X-Google-Thread: 10a146,9cfed302216836dc X-Google-Attributes: gid10a146,public X-Google-Thread: 10bb9b,9cfed302216836dc X-Google-Attributes: gid10bb9b,public X-Google-Thread: f74b3,9cfed302216836dc X-Google-Attributes: gidf74b3,public From: "MJR" <Rao.Mohith@compaq.com> Subject: Re: Swing Date: 1999/06/23 Message-ID: <7kric9$962$1@mailint03.im.hou.compaq.com> X-Deja-AN: 493092105 References: <7kr9ep$j1j$1@mailint03.im.hou.compaq.com> <7krbf2$nem$1@mailint03.im.hou.compaq.com> <7krf2k$7kl$1@nntp3.atl.mindspring.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 930172105 9410 172.18.100.18 (23 Jun 1999 21:08:25 GMT) Organization: Compaq Computer Corp. NNTP-Posting-Date: 23 Jun 1999 21:08:25 GMT Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.api,comp.lang.java.help,comp.lang.java.machine,comp.lang.java.misc,comp.lang.java.programmer,microsoft.public.inetexplorer.ie4.java_applets