JTextArea for input text from the user
I try to create a JTextArea that the user enters text to it, and I would like to use this text, when the user presses a button.
textArea.getText() gives me the original text, its like it is not updated even though in the gui, the text the user entered is shown.
How can I get the inserted text?
Thanks a lot,
Re: JTextArea for input text from the user
You have to use Text Areas in the following ways.
The JTextArea class provides a component that displays multiple lines of text and optionally allows the user to edit the text. If you need to obtain only one line of input from the user, you should use a text field. If you want the text area to display its text using multiple fonts or other styles, you should use an editor pane or text pane. If the displayed text has a limited length and is never edited by the user, use a label.
|Tags: button, input text, jtextarea, text area|
|Thread Tools||Search this Thread|
|Similar Threads for: "JTextArea for input text from the user"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Input text value problem||NetworkeR||Software Development||3||28-11-2009 11:56 AM|
|Check multiple text box input||GlassFish||Software Development||2||24-11-2009 01:23 PM|
|Setting input text values||Solaris||Software Development||3||23-11-2009 02:42 PM|
|Bolding text in a JTextArea||Kieran Blenkarne||Software Development||3||09-11-2009 01:10 PM|