Basic HTML version of Foils prepared 2 October 98

Foil 6 Example Java Code Accessed from JavaScript

From Netscape's LiveConnect Technology CPS640 Internet and Multimedia Technologies -- April 98. by Marek Podgorny,Nancy McCracken


1 import java.applet.*;
2 import java.awt.Graphics;
3 public class Hello extends Applet {
4 String str = "Hello, World";
5 int x = 25;
6 int y = 25;
7 public void paint ( Graphics g){
8 g.drawString ( str, x, y );
9 }
10 public void setString ( String newstr ){
11 str = newstr;
12 repaint();
13 }
14 public String getString() {
15 return str;
16 }

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 Nov 29 1998