sbool isChecked(JCheckBox checkBox) { ret checkBox != null && (bool) swing(func -> bool { checkBox.isSelected() }); } sbool isChecked(JCheckBoxMenuItem mi) { ret mi != null && (bool) swing(func -> bool { mi.isSelected() }); } sbool isChecked(JRadioButton rb) { ret rb != null && (bool) swing(() -> rb.isSelected()); }