Swing JCheckBox is based on MVC. Thus, I want that the check boxes in my GUI use a data model that my custom class provides.
That is:
checkBox1 is “bound” to a property isBackgroundShown
checkBox2 is “bound” to a property isResizingEnabled
The checkboxes should be based on property state, the property state should fire a checkbox refresh if changed.
actually, AbstractButtons don’t have a “real” model (which should be shareable across buttons) – the ButtonModel has per-instance view state (pressed, armed) mixed with more data-like state like selected. What’s worse, the selected property on the button only looks like a bound property (with setters and getters) but isn’t (never fires propertyChange).
Your options: