Basic HTML version of Foils prepared May 12 1996

Foil 38 Hello World Applet from Sun Tutorial
Getting Started

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


1 This prints in applet window, the classic Hello World string!
2 import java.awt.Graphics
3 public class HelloWorld extends java.applet.Applet {
  • public void paint(Graphics g) {
    • g.drawString("Hello world!", 50, 25);
  • }
4 }
5 g which is of class Graphics, is window in which applet runs (i.e. is displayed)

in Table To:


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.

Page produced by wwwfoil on Sun Dec 14 1997