All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.JPanel

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

public class JPanel
extends JComponent
implements Accessible

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
 o updateUI()
PENDING(jeff) - this should be done in BasicPanelUI

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 updateUI
public void updateUI()
PENDING(jeff) - this should be done in BasicPanelUI

Overrides:
updateUI in class JComponent
 o setOpaque
public void setOpaque(boolean isOpaque)
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  

Submit a bug or feature