Basic HTML version of Foils prepared April 25 98

Foil 6 HelloWorld for Tango - Java Applet (2)

From Simple Examples and Automatic Synchronization Tango Tutorial Alliance 98 NCSA Illinois -- April 27 98. by TangoInteractive Team


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( ) ) );
  • handle 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 ControlApplication



© 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