diff --git a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java index eb818d9..2dde544 100644 --- a/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java +++ b/src/main/java/com/bib/essensbestellungsverwaltung/MenueController.java @@ -7,6 +7,8 @@ import javafx.scene.Node; import javafx.scene.control.*; import javafx.scene.input.MouseEvent; +import java.util.HashMap; + public class MenueController { @FXML @@ -80,19 +82,13 @@ public class MenueController { public ObservableList buttons = FXCollections.observableArrayList(); - public void setButtonActive(){ - } + public void setButtonActive(ActionEvent event) { + Button b = (Button) event.getSource(); - public ObservableList getSiblings(Button b) { javafx.scene.Parent p = b.getParent(); buttons = p.getChildrenUnmodifiable(); - return buttons; - } - - public void setButtonActive(Button b) { - getSiblings(b); for(Node button : buttons){ b.getStyleClass().remove("active"); System.out.println(b.getStyleClass());