I have a button
and I want it to be clicked when I return true
to if
of another class, but I did not find any method how I do it.
Button b = new Button();
Another class:
public static ObservableList getObs(ObservableList<String> obs,ObservableList<String> obs2){
if(Main.b.algumMetodo() == true){
return obs2;
}else if(Main.b.algumMetodo() != true){
return obs;
}
return obs;
}
How do I do this?