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




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA