Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JTextField and JTextArea

Tags:

java

What is the different between JTextField and JTextArea? Is this possible to work with this two classes in a one class?

like image 598
Asus HP Avatar asked Dec 26 '22 16:12

Asus HP


1 Answers

In summary, a JTextField is a one-line text field, whereas a JTextArea can span over multiple lines.

The differences are clearly explained in the documentation: JTextArea and JTextField

Of course, you can use them in the same class. There would be zero conflicts between them.

like image 113
Redandwhite Avatar answered Jan 10 '23 11:01

Redandwhite