Javatpoint Logo
Javatpoint Logo

JavaFX Label

javafx.scene.control.Label class represents label control. As the name suggests, the label is the component that is used to place any text information on the screen. It is mainly used to describe the purpose of the other components to the user. You can not set a focus on the label using the Tab key.

Package: javafx.scene.control


Adding a Node to the scene graph

The following code implements Label into our Application.


JavaFX Label

Displaying image in a Label

JavaFX allows us to display some graphics next to the label text. There is a constructor in the Label class in which, we can pass any image along with the label text. The example given below is displaying the image in a Label.


JavaFX Label 2
Next TopicJavaFX Button

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA