Basic HTML version of Foils prepared April 25 98

Foil 10 Java API - code example ctd.

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


public boolean action(Event e,Object o) {
if (o instanceof TextField) {
String msg=un+" : "+tf.getText();
byte[] t=new byte[msg.length()]; //creation of byte table
msg.getBytes(0,msg.length(),t,0); // string to byte[]conversion
AppEventMessage em=new AppEventMessage(Const.DATA,t);
// The above is a new message
send(em); //Tango API call
tf.setText("");
return true;
}
else
return super.action(e,o);
}



© 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