I have this class called controller with a checkbox. I need to get this value in a class called Habitat because a method will do something according to that checkbox. I'm letting the checkbox as public static but it still saying cannot find symbol. I've imported the class too What should i do?
public class Controller {
...
@FXML
public static Checkbox checkBoxRules;
...
}
public class Habitat {
...
private void State()
{
if (Controller.checkBoxRules.isSelected()) {
...
}
}
Aucun commentaire:
Enregistrer un commentaire