How can I disable the 'Previous' button on my Screen of the ControlsFX WizardPane
? I am trying it with this method prev.setDisable(true)
but what I have is NullPointerException
.
public class MainApp extends Application {
Wizard wizard = new Wizard();
WizardPane1 page1 = new WizardPane1();
WizardPane page2 = new WizardPane();
WizardPane page3 = new WizardPane() {
@Override
public void onEnteringPage(Wizard wizard) {
Node prev = lookupButton(ButtonType.PREVIOUS);
prev.setDisable(true);
}
};
page1.setContent(page1.getInit());
wizard.setFlow(new LinearFlow(page1, page2, page3));
wizard.showAndWait();
}
public class WizardPane1 extends WizardPane {
public void initWizard() {}
}