public class Punkt extends Button {
public void set (boolean s) {
...
Color c;
if (s) {
c = Color.darkGray;
} else {
c = Color.yellow;
}
setBackground (c);
}
}
ggf. andere Farben probieren, benutze API-Dok für Klasse Color