[12:7] extends: Node, Control, Labeled
Represents a JavaFX Label, a non-editable text control for displaying text. The Label class extends Node, Control, and Labeled, providing functionality for setting label text and wrap options.
Label (Val
)
Initializes a new Label instance with the specified text. If no text is provided, the default text "Label" is used.
Val
The label text to display, or null for the default.this
objectsetWrap (bool Wrap
)
Sets whether the label text should wrap if it exceeds the label width.
Wrap
A boolean specifying if the text should wrap.this
object for chaining