Daniel Demesmaecker wrote:you could copy paste the printed path to your equals method of your if.
Better would be to create a boolean at the top of your class, set it to false when you change to classic.css and true if you switch to xmas. That way it will always work.
If you copy paste the path it won't work anymore once you install the program on a other computer or change the location of your program
Daniel Demesmaecker wrote:The only tip I can give you here is to print out your path to your xmas.css and compare it to the string used in your if statement, my guess is they won't match
Daniel Demesmaecker wrote:I want an exampe image how it's build, remember my comment about a borderpane when you were asking how to switch css files? If you had done that, now you snow would be in the centerpane and you're buttons in the left pane and you wouldn't had this issue. I don't even understand if you promote your panes to the front you don't see the snow, it falls behind the elements, not behind the pane, I know since when I was checking for ways to make the snow quit faster, I put an AnchorPane in my AnchorPane with the same hight and width and promoted it to the front when clicked on the classic css and that didn't work, the snow was still visible
Knute Snortum wrote:What have you tried? What about putting the buttons on the AnchorPane tied to the Bottom?
Please don't post long quotes. Only post as much as is needed for context.
Daniel Demesmaecker wrote:Did you manage to sort it out? If you think it might help, this is how I did it:
Daniel Demesmaecker wrote:That couldn't be the issue since the nullpointer happens before your code get's there, but it would have cause prijs later on
Norm Radder wrote:
How do I do this exactly?
Here is a link to the JavaFX API doc: https://docs.oracle.com/javase/8/javafx/api/
At the top of the page click on the INDEX link, then click on G for the first letter of the method, search for the method: getScene, then click on the link for that method and read its API doc.
Or if you know the name of the class that getScene is in, find its name in the left hand window, click on it and then scan down to the API doc for the getScene method.
Daniel Demesmaecker wrote:In several places in your code you have
Why not deining it once a the top of your controller and use that in the rest of your code? Normally that shouldnt give you the nullpointer, but still. When Im home, I'll post my whole project so you can set where it differs.
Daniel Demesmaecker wrote:You didn't just copy paste my code right?
I use the scene of the static stage defined in my Main.class, while you use the stage of sideMenu, so you'll have to adjust that