Basic HTML version of Foils prepared April 25 98

Foil 8 Java API - code example

From General Tango API Java JavaScript and C Tango Tutorial Alliance 98 NCSA Illinois -- April 27 98. by TangoInteractive Team


1 import messages.*; //Tango Packages
2 import interfaces.AppletBase;
3 import consts.*;
4 Public class Chat extends AppletBase{ //Tango base class
5 public void init() {
6 setLayout(new BorderLayout()); //GUI setup
7 add("Center",ta=new TextArea());
8 add("South",tf=new TextField());
9 register(); //Tango API call
10 byte[] t=new byte[1];
11 t[0] = CAConsts.USERNAME; //creation of Tango control message
12 AppEventMessage em=new AppEventMessage(Const.CONTROL,t);
13 send(em); //Tango API call
14 }

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