0
Can someone tell me the difference between JTextField and JTextArea, and if so how do i use the JTextArea
Java Graphical User Interface
2 Respuestas
+ 2
A text field is just one line. For example
name: [ ]
password: [ ]
[ ] would be a textfield.
A textarea is for multiline text input. Something you would use in an text document or the area where we write our posts.
Are you searching for tutorials about JTextField / JTextArea or do you have a project and don't know which one you should use?
+ 2
JTextField and JTextArea are almost similar and the difference is explained by Denise Roßberg .
Use it just like you use the JTextField.
<JTextArea name>.getText(); and
<JTextArea name>.setText();