JavaSwingLookAndFeel: Buttons


Buttons

This is similar to the menu item analysis, only for buttons, where the notions are a little more complicated.

Kinds of buttons

selectable button -> JToggleButton, JCheckBox, JRadioButton

action-button(1) -> JButton

checkable -> JToggleButton (without group), JCheckBox

radio-able -> JToggleButton (with group), JRadioButton

press-button (icon free for use, other look-changes when pressed) -> JButton, JToggleButton

icon-button (standard icon, icon changes when pressed) -> JCheckBox, JRadioButton

(1) can be default button/default capable, but this is not really specific

Serious question: Why is there only JToggleButton (which can either be in a ButtonGroup or not), but two icon-button versions of it (JCheckBox, JRadioButton) depending on whether they are (expected to be) in a group or not?

New features

JCheckBox - borderPaintedFlat???

JCheckBox/JRadioButton - icon not taken from action (as expected for an icon-button)


(C) 2001-2009 Christian Kaufhold (swing@chka.de)