I am making a simple software to Reserve Stadium Seats. I have a main page wish is the Login Page. I have a simple design. With a transparent background just to give it a form. As you can see in the image below.
As you can see the code can bee seen behind the form. When i login i have a simple logout button that takes me again to the same fxml to load the form. but this time the background is no longer transparent:
. As you see here it is green. it is by default white but i was trying to make it transparent again.
this is the code i tried to do:
public void logoutButton (ActionEvent event) throws IOException {
Parent root = FXMLLoader.load(getClass().getResource("Main.fxml"));
Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();
Scene scene = new Scene(root);
root.setStyle("-fx-background-color: #20825170;");
stage.setScene(scene);
}
even changing the style to transparent wont work i tried it. any help ?