All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JPanel

public class JPanel
extends JComponent
implements Accessible

Variable Index

 o isOpaque

Constructor Index

 o JPanel()
Create a new JPanel with a double buffer and a flow layout
 o JPanel(boolean)
Create a new JPanel with a FlowLayout.
 o JPanel(LayoutManager)
Create a new buffered JPanel with a specific layout manager
 o JPanel(LayoutManager, boolean)
Creates a new JPanel

Method Index

 o getAccessibleRole()
Get the role of this object.
 o isOpaque()
Return whether the receiving panel is opaque This method is overriden from JComponent
 o paintComponent(Graphics)
Overriden from JComponent, paint the backgroud if the component is opaque.
 o setOpaque(boolean)
Set whether the receiving panel is opaque If the JPanel is opaque, it will paint its background

Variables

 o isOpaque
 protected boolean isOpaque

Constructors

 o JPanel
 public JPanel(LayoutManager layout,
               boolean isDoubleBuffered)
Creates a new JPanel

 o JPanel
 public JPanel(LayoutManager layout)
Create a new buffered JPanel with a specific layout manager

 o JPanel
 public JPanel(boolean isDoubleBuffered)
Create a new JPanel with a FlowLayout. If isDoubleBuffered is true, the JPanel will use a double buffer.

 o JPanel
 public JPanel()
Create a new JPanel with a double buffer and a flow layout

Methods

 o setOpaque
 public void setOpaque(boolean aFlag)
Set whether the receiving panel is opaque If the JPanel is opaque, it will paint its background

 o isOpaque
 public boolean isOpaque()
Return whether the receiving panel is opaque This method is overriden from JComponent

Overrides:
isOpaque in class JComponent
 o paintComponent
 public void paintComponent(Graphics g)
Overriden from JComponent, paint the backgroud if the component is opaque. The color used is the one returned by getBackground() Override this method if you want to change how the JPanel paints its background

Overrides:
paintComponent in class JComponent
 o getAccessibleRole
 public AccessibleRole getAccessibleRole()
Get the role of this object.

Returns:
an instance of AccessibleRole describing the role of the object
Overrides:
getAccessibleRole in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index