All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.awt.FullWidthPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.sun.wizards.awt.InsetsPanel
                                   |
                                   +----com.sun.wizards.awt.FullWidthPanel

public class FullWidthPanel
extends InsetsPanel
The FullWidthPanel is a panel that assumes the same width as its parent. In the following example, the FullWidthPanel is used to contain a button. As a result, the button assumes the width of the applet frame.

Graphic of FullWidthPanel containing a button.

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()
     {
       FullWidthPanel fullWidthPanel = new FullWidthPanel();
       add(fullWidthPanel);
       fullWidthPanel.add(new Button("Button 1"));
     }
 }
 


Constructor Index

 o FullWidthPanel()
Constructs a new FullWidthPanel.

Method Index

 o getMinimumSize()
Gets the minimum size of this component.
 o getPreferredSize()
Gets the preferred size of this component.

Constructors

 o FullWidthPanel
 public FullWidthPanel()
Constructs a new FullWidthPanel.

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this component.

Returns:
A dimension object indicating this component's preferred size.
Overrides:
getPreferredSize in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the minimum size of this component.

Returns:
A dimension object indicating this component's minimum size.
Overrides:
getMinimumSize in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index