Javatpoint Logo
Javatpoint Logo

Java AWT TextField

The object of a TextField class is a text component that allows the editing of a single line text. It inherits TextComponent class.

AWT TextField Class Declaration

Java AWT TextField Example

Output:

java awt textfield example 1

Java AWT TextField Example with ActionListener

Output:

java awt textfield example 2
Next TopicJava AWT TextArea




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA