HELP! * GREY=local LOCAL HTML version of Foils prepared July 10 1996
Foil 46 Hello World Applet from Sun Tutorial Getting Started
From Basic Lectures on Java Language Applets Graphics Networking Trip to China and Icase Tutorial -- July 12-28 and June 10-13 96. byGeoffrey C. Fox * See also color IMAGE
This prints in applet window, the classic Hello World string!
import java.awt.Graphics
public class HelloWorld extends java.applet.Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
g which is of class Graphics, is window in which applet runs (i.e. is displayed)
Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.