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 | } |