Java Reference
In-Depth Information
Table 4-11. AbstractButton Properties (Continued)
Property Name
Data Type
Access
mnemonic
int
Write-only
model
ButtonModel
Read-write bound
multiClickThreshhold
long
Read-write
pressedIcon
Icon
Read-write bound
rolloverEnabled
boolean
Read-write bound
rolloverIcon
Icon
Read-write bound
rolloverSelectedIcon
Icon
Read-write bound
selected
boolean
Read-write
selectedIcon
Icon
Read-write bound
selectedObjects
Object[ ]
Read-only
text
String
Read-write bound
UI
ButtonUI
Read-write
verticalAlignment
int
Read-write bound
verticalTextPosition
int
Read-write bound
Note AbstractButton has a deprecated label property. You should use the equivalent text
property instead.
One property worth mentioning is multiClickThreshhold . This property represents a time,
in milliseconds. If a button is selected with a mouse multiple times within this time period,
additional action events won't be generated. By default, the value is zero, meaning each press
generates an event. To avoid accidental duplicate submissions from happening in important
dialogs, set this value to some reasonable level above zero.
Tip Keep in mind that all AbstractButton children can use HTML with its text property to display
HTML content within the label. Just prefix the property setting with the string <html> .
ButtonModel/Class DefaultButtonModel Interface
The ButtonModel interface is used to describe the current state of the AbstractButton component.
In addition, it describes the set of event listeners objects that are supported by all the different
AbstractButton children. Its definition follows:
 
Search WWH ::




Custom Search