Label - relu91/nifty-gui GitHub Wiki

Table of Contents

Label

Description

The Label displays text that can be changed from Java. It can be dynamically created from Java with the LabelBuilder and created from Nifty XML with the Standard <control></control> Tag.

Java API

Label

Standard Parameters

The following table describes all Label parameters.

Name Datatype Default Description
text String "" The initial label text to display.
color String (not set, default value derived from nifty-label Style) The color of the Label.

EventBus Notification

There is no EventBus Notification necessary for the Label control.

Java Builder Example

// Using the builder pattern
control(new LabelBuilder("keyEventLabelId", "Label Text:");

XML Example

<!-- simple label -->
<control name="label" text="hello" />

Back to Nifty Standard Controls (Nifty 1.3)

⚠️ **GitHub.com Fallback** ⚠️