Class awt.Label
All Packages This Package Previous Next
Class awt.Label
java.lang.Object
|
+----awt.Component
|
+----awt.Label
-
public class
Label
-
extends Component
A class that displays read-only text.
-
Version:
-
1.19 03 Feb 1995
-
Author:
-
Sami Shaio
-
label
-
-
Label(String, String, Container, Font)
-
Constructs a label.
-
Label(String, String, Container)
-
Constructs a label with the default font.
-
dispose()
-
Disposes of this label.
-
getPreferredSize()
-
Return the preferred size of this label.
-
map()
-
Make this label visible.
-
move(int, int)
-
Move this label to the given x,y position.
-
reshape(int, int, int, int)
-
Reshapes this label to the given dimensions.
-
setColor(Color)
-
Sets the color to draw this label.
-
setFont(Font)
-
Sets the font to use for this label.
-
setHFill(boolean)
-
Makes this label stretch to be the width of its container.
-
setText(String)
-
Sets the text to display for this label.
-
unMap()
-
Make this label invisible.
label
public String label
Label
public Label(String pLabel,
String pName,
Container pParent,
Font font)
-
Constructs a label.
-
Parameters:
-
pLabel
-
the text of the label.
-
pName
-
the name of this component.
-
pParent
-
the parent window for this label.
-
font
-
the font to use for this label.
Label
public Label(String pLabel,
String pName,
Container pParent)
-
Constructs a label with the default font.
setHFill
public void setHFill(boolean t)
-
Makes this label stretch to be the width of its container.
setFont
public void setFont(Font f)
-
Sets the font to use for this label.
setColor
public void setColor(Color c)
-
Sets the color to draw this label.
setText
public void setText(String l)
-
Sets the text to display for this label.
move
public void move(int x,
int y)
-
Move this label to the given x,y position.
-
Overrides:
-
move in class Component
reshape
public void reshape(int x,
int y,
int w,
int h)
-
Reshapes this label to the given dimensions.
-
Overrides:
-
reshape in class Component
dispose
public void dispose()
-
Disposes of this label.
-
Overrides:
-
dispose in class Component
getPreferredSize
public Dimension getPreferredSize()
-
Return the preferred size of this label.
-
Overrides:
-
getPreferredSize in class Component
map
public void map()
-
Make this label visible.
-
Overrides:
-
map in class Component
unMap
public void unMap()
-
Make this label invisible.
-
Overrides:
-
unMap in class Component
All Packages This Package Previous Next