This content has been marked as final. Show 2 replies
disable is a direct property of the node. You can set it with setDisable(...) or disableProperty().set(...). Setting it to true causes it, and all of its descendants to appear in a disabled state and not respond to user input.
disabled is a read only property which specifies if the node behaves in a disabled state. That is, getDisabled() returns true if the disable property of the node *or any of its ancestors is set to true.
The rendering and event handling is affected by the disabled property, so the button above would appear disabled and not respond to user input.
Pane pane = new Pane(); Node node = new Button("Click me"); pane.getChildren().add(node); node.setDisable(false); pane.setDisable(true); node.disabledProperty().get(); // is true node.disableProperty().get(); // is false