ControlValueAccessor (final JCheckBox from) { return new ControlValueAccessor<Boolean>() { @Override public Boolean getValue() { return from.isSelected(); } @Override public void setValue(Boolean value) { from.setSelected(value.booleanValue()); } @Override public Class<Boolean> getType() { return Boolean.class; } @Override public boolean isEnabled() { return from.isEnabled(); } @Override public void addChangeListener(final Runnable listener) { from.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { listener.run(); } }); } }; }