Basic HTML version of Foils prepared

Foil 11 HelloWorld for TANGO - Java Applet (2)

From General Tango API Java JavaScript and C Tango Tutorial San Diego MRA -- June 26 27 98 Datemod;June 26 98. by TangoInteractive Team


First add collaboratory functionality to the previous class
  • call send(byte[ ]) when Return pressed
    • if ((evt.target == text) && (evt.id == Event.ACTION_EVENT ))
    • send(stringToBytes(text.getText()));
  • define method receive(byte[] b) when data arrives
    • text.setText(bytesToString(b));
Embed the applet in an HTML page
  • <applet codebase="." archive="tm.jar,JExamp.class" code="JExamp.class" width=280 height=33 mayscript>
  • </applet>
Register the page in a TANGO Control Application



© 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