textArea problem
hi, i need to know how to get the text somone has entered in a text area.
i have tried
textArea.getText()
but that gave me an error saying "cannot find symbol".
here is my code:
EditUpperMenuItem.addActionListener(new ActionListener(){
publicvoid actionPerformed(ActionEvent e){
String text = textArea.getText();
actionUpper(text);
}
});
please help me, thanks
edit: here is the code for the textarea incase thats the problem:
JTextArea textArea =new JTextArea(40, 10);
textArea.setLineWrap(true);
JScrollPane scrollPane =new JScrollPane(textArea);
getContentPane().add( scrollPane );
}

