In Java How to program, 5th edition, I can not get past the example in
chapter 3, page 89 to page 96. Is there some errata for this?
I did not/could not load all the tools. I am coming from Slick edit
and from Dos, and they both say that my copying of that example is
flawed.
Now I made a change: the name of the file is Lab2.java, the html file
is Lab2.html.
The contents of my Java file is:
// fig 3.6 welcome Applet.java
// A first applet in Java
// Java packages
import java.awt.Graphics; // import class graphics
import javax.swing.JApplet; // import class JApplet
public class Lab2 extends JApplet {
// draw text on applets background
public void paint ( Graphics g )
{
// call super class version of the method paint
super.paint( g );
// draw a string at the x-coordinate 25 and y coordinate 25
g.drawString( "Welcome to Java Programming", 25,25);
}// end method paint
}// end class Lab2
The contents of the Html file is:
<html>
<applet code=Lab2.class" width="300" height= "45">
</applet>
</html>
I am trying to learn Java on my own, and would greatly appriciate any
assistance you can give.
Sean