Run code below, and note that the 'Hello world!' text is shown even though the button is contained within a disabled tab.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.stage.Stage;
public class App extends Application {
@Override
public void start(Stage stage) {
TabPane pane = new TabPane();
final Tab disabled = new Tab("Disabled");
disabled.setContent(new Button("Hello world!"));
disabled.setDisable(true);
pane.getTabs().add(disabled);
pane.getTabs().addAll(new Tab("ABCABCABCABC"), new Tab("ABC"));
Scene scene = new Scene(pane,200,200);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.stage.Stage;
public class App extends Application {
@Override
public void start(Stage stage) {
TabPane pane = new TabPane();
final Tab disabled = new Tab("Disabled");
disabled.setContent(new Button("Hello world!"));
disabled.setDisable(true);
pane.getTabs().add(disabled);
pane.getTabs().addAll(new Tab("ABCABCABCABC"), new Tab("ABC"));
Scene scene = new Scene(pane,200,200);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}