Javatpoint Logo
Javatpoint Logo

Java AWT Label

The object of Label class is a component for placing text in a container. It is used to display a single line of read only text. The text can be changed by an application but a user cannot edit it directly.

AWT Label Class Declaration

Java Label Example

Output:

java awt label example 1

Java AWT Label Example with ActionListener

Output:

java awt label example 2
Next TopicJava AWT TextField




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA