I am using the JDK8u45 and I am trying to use the text input dialog but is there a way to disable the ok button until I enable it? I checked the java docs and did not see a disable feature. Is there another way to do this in java 8 if this does not work?
Lookup the button and invoke setDisable
on it.
TextInputDialog dialog = new TextInputDialog();
dialog.getDialogPane().lookupButton(ButtonType.OK).setDisable(true);
disable
is a property, so you could bind the value to some condition if you wish (rather than explicitly calling setters to disable and re-enable it).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With