The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Anil on July 16, 2000 at 4:01 PM

Here is the sample applet code which compiles but which
does not start up the appletviewer:

import java.applet.Applet;
import java.awt.*;
public class Confuci extends Applet
public void paint (Graphics page)
page.drawString ("Forget injuries, never forget kindness.",50,50);
page.drawString ("-- Confucius.",70,70);

I tried to work the above Applet program without the IE or
netscape navigator browsers. The applet compiles when I enter:

The next line is:
C:>jview /a Confuci

At this point I expected the dos-prompt,in which I work, to compile(which it does) and open an application window and run the
applet. - It doesn't! Instead, without exibiting any errors, it goes to the c-prompt:

I want to run this applet and see the drawString method in
action - Can you provide me with some insight into what's going on? The operating system is Windows NT 4.0, and the java version I'm using is jdk 1.2.2.

Also, I tried to view Thinking in Java on the internet.
I'm having difficulty in doing so. I'd appreciate any help in this matter as
Thanks in advance for the assistance.

  • It works jigar shah July 22, 2000 at 11:48 AM (0)
  • I got that one madhav panatula July 17, 2000 at 3:39 PM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us