APIdia Launch Partner
Top Description Fields Methods
java.awt.peer

public Interface LabelPeer

extends ComponentPeer
Known Direct Implementers
sun.awt.X11.XLabelPeer
Imports
java.awt.Label

The peer interface for Label. The peer interfaces are intended only for use in porting the AWT. They are not intended for use by application developers, and developers should not implement peers nor invoke any of the peer methods directly on the peer instances.

Field Summary

Inherited from java.awt.peer.ComponentPeer:
DEFAULT_OPERATIONNO_EMBEDDED_CHECKRESET_OPERATIONSET_BOUNDSSET_CLIENT_SIZESET_LOCATIONSET_SIZE

Method Summary

Modifier and TypeMethod and Description
public void
setAlignment(int
the alignment of the label text
alignment
)

Sets the alignment of the label text.

public void
setText(String
the text to be displayed on the label
label
)

Sets the text to be displayed on the label.

Inherited from java.awt.peer.ComponentPeer:
applyShapecanDetermineObscuritycoalescePaintEventcreateBufferscreateImagecreateVolatileImagedestroyBuffersdisposeflipgetBackBuffergetColorModelgetFontMetricsgetGraphicsgetGraphicsConfigurationgetLocationOnScreengetMinimumSizegetPreferredSizehandleEventhandlesWheelScrollingisFocusableisObscuredisReparentSupportedlayoutpaintprintreparentrequestFocussetBackgroundsetBoundssetEnabledsetFontsetForegroundsetVisiblesetZOrderupdateCursorImmediatelyupdateGraphicsData

Method Detail

setAlignmentback to summary
public void setAlignment(int alignment)

Sets the alignment of the label text.

Parameters
alignment:int

the alignment of the label text

See Also
Label#setAlignment(int), Label#CENTER, Label#RIGHT, Label#LEFT
setTextback to summary
public void setText(String label)

Sets the text to be displayed on the label.

Parameters
label:String

the text to be displayed on the label

See Also
Label#setText