I am using a single JCheckBox
as an un-editable indicator for when something happens in my program. Right now I have this:
public void update(Observable o, Object arg) {
try {
if (Controller.c.turn.equals(this)) {
tp.turnCheckBox.setBorderPainted(true);
}
else {
tp.turnCheckBox.setBorderPainted(false);
}
} catch (Exception e) {
}
Basically, instead of painting the turnCheckBox
border... I want to have a checkmark in it.
It seems like it would be a simple pre-made method, maybe I am missing something but I can't get it to happen.
Using tp.turnCheckBox.setSelected (boolean isSelected)
will check (or uncheck) the checkbox.