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 |
13 | (Const.CONTROL,t); |
14 | send(em); //TANGO API call |
15 | } |