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


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



© 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