1
I have a button
and I want when it’s clicked to return true
in a if
of another class, but I haven’t found any method of how I do it.
Button b = new Button();
Other 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 that?
But do not to make it because within the if will have to return an Observablelist, I will edit the question.
– lucas daniel
Actually my problem is that he can’t change the Observablelist
– lucas daniel
I edited the answer too. Good luck!
– ddmps
What is this
View v
? Ain’t that Swing?– lucas daniel
It’s the button that was clicked.
– ddmps
I’m sorry, I still don’t understand. But just re-exporting I want that when I click the button it returns the Obs(Observablelist) and if I click again return the other Observablelist(Obs2).
– lucas daniel
It worked, I did it the way you said and I did it, thank you!
– lucas daniel