I am trying to figure out how to get the HBox
object if the Button
sitting in the HBox
was clicked on, in JavaFX.
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
Button btn = (Button)event.getSource();
//get the the Hbox object that this button in is
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…