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
A lightweight panel that provides double buffering support.
-
darkGray
-
-
ETCHED
-
-
gray
-
-
lightGray
-
-
LOWERED
-
-
NONE
-
-
RAISED
-
-
JPanel()
- Creates a Lightweight Panel
-
JPanel(boolean)
- Creates a Lightweight Panel.
-
JPanel(LayoutManager)
- Creates a new panel with the specified layout manager.
-
createOffscreenImage()
-
-
getBorderStyle()
- Returns the style of the border.
-
invalidate()
- Invalidates the panel.
-
isBuffered()
- Returns whether this panel is double buffered.
-
isOpaque()
-
-
paint(Graphics)
- Paints the panel
-
paintBorder(Graphics)
-
-
setBackgroundCleared(boolean)
- Sets whether the paint method fills the background before painting.
-
setBorderStyle(int)
- Set the style of the border.
-
setBounds(int, int, int, int)
- Override setBounds to null out the offscreen buffer.
-
setBuffered(boolean)
- If b is "true", then all painting is double
buffered.
-
validate()
- Validates the panel.
NONE
public static final int NONE
LOWERED
public static final int LOWERED
RAISED
public static final int RAISED
ETCHED
public static final int ETCHED
darkGray
public static final Color darkGray
gray
public static final Color gray
lightGray
public static final Color lightGray
JPanel
public JPanel()
- Creates a Lightweight Panel
JPanel
public JPanel(LayoutManager layout)
- Creates a new panel with the specified layout manager.
- Parameters:
- layout - the layout manager for this panel
JPanel
public JPanel(boolean buffered)
- Creates a Lightweight Panel. If buffered is "true", then
all painting will be double buffered.
isBuffered
public boolean isBuffered()
- Returns whether this panel is double buffered.
setBuffered
public void setBuffered(boolean b)
- If b is "true", then all painting is double
buffered.
getBorderStyle
public int getBorderStyle()
- Returns the style of the border.
setBorderStyle
public void setBorderStyle(int borderStyle)
- Set the style of the border.
validate
public void validate()
- Validates the panel. If the panel needs double buffering,
it probes upwards to determine if a parent is already
double buffering. If one is found, then this panel will not
do the buffering.
- Overrides:
- validate in class Container
createOffscreenImage
protected void createOffscreenImage()
invalidate
public void invalidate()
- Invalidates the panel.
- Overrides:
- invalidate in class Container
setBounds
public void setBounds(int x,
int y,
int w,
int h)
- Override setBounds to null out the offscreen buffer.
- Overrides:
- setBounds in class JComponent
isOpaque
public boolean isOpaque()
- Overrides:
- isOpaque in class JComponent
setBackgroundCleared
public void setBackgroundCleared(boolean b)
- Sets whether the paint method fills the background before painting.
paint
public void paint(Graphics g)
- Paints the panel
- Overrides:
- paint in class JComponent
paintBorder
public void paintBorder(Graphics g)
All Packages Class Hierarchy This Package Previous Next Index