0

When i run the Main00App.java from appletviewer i have Start: applet not initiated. The commented html is read because i can resize the window using the width and height.

import java.awt.*;
import java.applet.*;

/*
<applet code="Main00App.class" width=200 height=150>
</applet>
*/

public class Main00App extends Applet {

public void paint(Graphics g) {
    g.drawString("Java applet", 10, 20);
}

}
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
T4l0n
  • 595
  • 1
  • 8
  • 25
  • 1) Why code an applet? If it is due to the teacher specifying it, please refer them to [Why CS teachers should **stop** teaching Java applets](http://programmers.blogoverflow.com/2013/05/why-cs-teachers-should-stop-teaching-java-applets/). 2) Why use AWT? See [this answer](http://stackoverflow.com/questions/6255106/java-gui-listeners-without-awt/6255978#6255978) for many good reasons to abandon AWT using components in favor of Swing. – Andrew Thompson Jul 16 '15 at 08:42

1 Answers1

1

I think so that you need to run following program by command line using the applet viewer:

appletviewer Main00App.java 

I had run the following program. It works for me.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Sunil
  • 437
  • 3
  • 11