com.sun.java.swing.* have been renamed to javax.swing.*.

Update your import declarations and you should be fine.




> Richard James wrote:
> 
> I am new to java and the 1.2 JDK. I am running RedHat 5.2 and the
> Blackdown JDK1.2-v1pre-release. The install went fine. I have finally
> figured out the libstdc++ link and I can successfully compile command
> line applications.
> 
> However, I am getting the following error on this simple applet. Any
> ideas on how to resolve this.
> 
> [root@localhost java]# cat RootApplet.java
> import java.awt.*;
> 
> public class RootApplet extends com.sun.java.swing.JApplet {
> int number;
> 
> public void init() {
> number = 225;
> }
> 
> public void paint(Graphics screen) {
> super.paint (screen);
> Graphics2D screen2D = (Graphics2D) screen;
> screen2D.drawString("The square root of " +
> number +
> " is " +
> Math.sqrt(number), 5, 50);
> }
> }
> [root@localhost java]# javac RootApplet.java
> RootApplet.java:3: Superclass com.sun.java.swing.JApplet of class
> RootApplet not found.
> public class RootApplet extends com.sun.java.swing.JApplet {
> ^
> 1 error
> [root@localhost java]#
> 
> Thanks
> Richard James
> 
> 

-- 
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
======================================================================
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"

The views expressed herein do not necessarily reflect those of my
employer.

Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to