All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.awt.Header
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----com.sun.wizards.awt.Header
- public class Header
- extends Canvas
The Header object displays a banner of text. The banner has a default background
of blue, and a default foreground of white.
Here is the code for this applet:
import java.applet.Applet;
import java.awt.*;
import com.sun.wizards.awt.*;
public class Test extends Applet
{
public void init()
{
setLayout(new BorderLayout());
add(new Header("Header Text"), "North");
}
}
-
Header()
- Constructs a Header object with no text.
-
Header(String)
- Constructs a Header object with the specified
text.
-
getMinimumSize()
- Returns the minimum size of this header object.
-
getPreferredSize()
- Returns the preferred size of this header object.
-
getText()
- Returns the text currently being displayed in the header.
-
paint(Graphics)
- Paints this header object using the specified
Graphics object.
-
setText(String)
- Sets the text to be displayed in the header.
Header
public Header()
- Constructs a Header object with no text.
Header
public Header(String headerText)
- Constructs a Header object with the specified
text.
- Parameters:
- headerText - The text to be displayed in the
new Header object.
getText
public String getText()
- Returns the text currently being displayed in the header.
setText
public void setText(String headerText)
- Sets the text to be displayed in the header.
- Parameters:
- headerText - The desired text for the header.
paint
public void paint(Graphics g)
- Paints this header object using the specified
Graphics object.
- Parameters:
- g - The Graphics object used to paint the Header.
- Overrides:
- paint in class Canvas
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of this header object.
- Returns:
- The preferred size.
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this header object.
- Returns:
- The minimum size.
- Overrides:
- getMinimumSize in class Component
All Packages Class Hierarchy This Package Previous Next Index