#

| Chapter 23 java.awt.peer Reference |

# LabelPeer

## Name

LabelPeer

##

## Description

`LabelPeer` is an interface that defines the basis for label components.

## Interface Definition

    public abstract interface java.awt.peer.LabelPeer
       extends java.awt.peer.ComponentPeer {
      // Interface Methods
      public abstract void setAlignment (int alignment);
      public abstract void setText (String label);
    }

## Interface Methods

### setAlignment

#### public abstract void setAlignment (int alignment)

Parameters

  alignment

    New alignment for label's peer.

Description

  Changes the current alignment of label's peer.

### setText

#### public abstract void setText (String label)

Parameters

  label

    New text for label's peer.

Description

  Changes the current text of label's peer.

## See Also

`ComponentPeer`, `String`

FramePeer |  | LightweightPeer