1 | public boolean action(Event e,Object o) { |
2 | if (o instanceof TextField) { |
3 | String msg=un+" : "+tf.getText(); |
4 | byte[] t=new byte[msg.length()];//create byte table |
5 | msg.getBytes(0,msg.length(),t,0);//string to byte[]conversion |
6 | AppEventMessage em=new AppEventMessage(Const.DATA,t); |
7 | // The above is a new message |
8 | send(em); //TANGO API call |
9 | tf.setText(""); |
10 | return true; |
11 | } |
12 | else |
13 | return super.action(e,o); |
14 | } |