Java Reference
In-Depth Information
Note The list of client properties is probably one of the least documented aspects of Swing. Chapter 20
lists the available properties I was able to determine. Also, while Metal is the default look and feel, what you
see is called Ocean. Ocean is a theme of the Metal look and feel and makes Metal look a bit flashier.
JComponent Properties
You've seen some of the pieces shared by the different JComponent subclasses. Now it's time to
look at the JavaBeans properties. Table 4-2 shows the complete list of properties defined by
JComponent , including those inherited through the AWT Container and Component classes.
Table 4-2. JComponent Properties
Property Name
Data Type
Component
Access
Container
Access
JComponent
Access
accessibleContext
AccessibleContext
Read-only
N/A
Read-only
actionMap
ActionMap
N/A
N/A
Read-write
alignmentX
float
Read-only
Read-only
Read-write
alignmentY
float
Read-only
Read-only
Read-write
ancestorListeners
AncestorListener[ ]
N/A
N/A
Read-only
autoscrolls
boolean
N/A
N/A
Read-write
background
Color
Read-write
bound
N/A
Write-only
backgroundSet
boolean
Read-only
N/A
N/A
border
Border
N/A
N/A
Read-write
bound
bounds
Rectangle
Read-write
N/A
N/A
colorModel
ColorModel
Read-only
N/A
N/A
componentCount
int
N/A
Read-only
N/A
componentListeners
ComponentListener[ ]
Read-only
N/A
N/A
componentOrientation
ComponentOrientation
Read-write
bound
N/A
N/A
componentPopupMenu
JPopupMenu
N/A
N/A
Read-write
components
Component[ ]
N/A
Read-only
N/A
containerListeners
ContainerListener[ ]
N/A
Read-only
N/A
cursor
Cursor
Read-write
N/A
N/A
cursorSet
boolean
Read-only
N/A
N/A
debugGraphicsOptions
int
N/A
N/A
Read-write
displayable
boolean
Read-only
N/A
N/A
 
Search WWH ::




Custom Search