TextField methods help!
Posted on 2004-08-13
I have a textField and a textArea:
TextArea messages = new TextArea(10,50);
TextField message = new TextField(52);
I have an ActionListener here:
public void actionPerformed(ActionEvent e)
// Complete message sending action
What I wanna do is, when the user enter stuff into the textField and press enter, I wan the text to appear in textArea and the textField will be cleared. First, which method of TextField should I use to get the text? And second, how can I clear the field?