I have a class that implements Initializable.
public abstract class ExampleClass implements Initializable {
public void ExampleClass() {
// Load FXML
}
@Override
public void initialize(URL location, ResourceBundle resources) {
// Initialize stuff
}
public void afterInitialize() {
// Do things that are reliant upon the FXML being loaded
}
}
I then extend this abstract class:
public class ExampleSubclass extends ExampleClass {
public ExampleSubclass() {
super(/* real code has params */);
this.afterInitialize(); // Problem here
}
}
However when I call afterInitialize(), it behaves as though the FXML in the abstract class hasn't been loaded yet. This confuses me, as I call the super() constructor first, so I believe the FXML should have already been loaded.
What am I doing wrong?
Thanks in advance.