label.setText NullPointerException
Hi first time here but here goes: I have a JavaFX application that changes the FXML UI labels dynamically and the data is pulled from a Player class. The two classes in question are Player.java and InterfaceHandler.java . The player class stores player details and I want to pass the details to the Interface class which sets the text on the labels. As a test my FXML UI just has a button and two labels. If it click the button it calls the handleButton method it sets locationLabel to "Town" fine. However if I call the locationLabel() method in my Player class I get a NullPointerException when