Java and Scene Builder How to Disable and Enable Tab

user5078574

I'm building an application using NetBeans and Scene Builder. I've got a TabPane, however, I wish to disable the 3rd tab in the pane when the btnAnonymousClientClick is clicked, how would I go about doing so?

My Code:

public class FXMLDocumentController implements Initializable {
    @FXML
    private Button btnCreateAnonymousClient;
    @FXML
    private Button btnCancel;
    @FXML
    private TextField txtAnonymousClientFirstName;
    @FXML
    private Label lblFirstName;
    @FXML
    private Label lbl;
    @FXML
    private TabPane tabControlPane;

    /**
     * Initializes the controller class.
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }    

    @FXML
    private void btnAnonymousClientClick(ActionEvent event) {

    }

    @FXML
    private void btnAnonymousClientCancel(ActionEvent event) {

    }

}
Jan

You can disable a Tab by adding a fx:id to it and adding it to your code.

@FXML
private Tab yourTabFXID


yourTabFXID.setDisable(true);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

JavaFX Scene Builder custom tab

From Dev

Java Scene Builder 2.0, Tab2 is switch to Tab1 in editor?

From Dev

How can we target java 7 with Scene builder 2?

From Dev

how to make image buttons on java fxml using scene builder?

From Dev

How can we target java 7 with Scene builder 2?

From Dev

How can I draw a hexagon in Java Scene Builder 2.0?

From Dev

JavaFX + Scene Builder how switch scene

From Dev

Java Enable/Disable Button

From Dev

enable disable jquery tab using class or id

From Dev

How to enable / disable a Preference?

From Dev

How to enable or disable services?

From Dev

How to enable or disable services?

From Dev

How to enable / disable a Preference?

From Dev

How to Enable and Disable Buttons

From Dev

How to enable/disable a checkbox

From Dev

enable tab with multiple input and disable tab with one input

From Dev

How to merge cells in JavaFX Scene builder?

From Dev

How to build scene builder from openjfx sources

From Dev

How to make window fullscreen/maximized in Scene Builder?

From Dev

Scene Builder: How to hide borders on panels, etc

From Dev

How to merge cells in JavaFX Scene builder?

From Dev

How to get a picture over a sphere in Scene Builder

From Dev

How to run scene builder standalone in Debian

From Dev

How to create an FXML file for an already created new component in java than add it to scene builder?

From Dev

How do you change the label text in java using eclipse and scene builder?

From Dev

How do I pass two parameters as XML to my controller class on Java Scene Builder?

From Dev

Sending data from one tab to another tab in javafx 8 with eclipse and scene builder

From Java

How to enable/disable inputs in blazor

From Dev

How to disable and enable keyboard in ubuntu?

Related Related

  1. 1

    JavaFX Scene Builder custom tab

  2. 2

    Java Scene Builder 2.0, Tab2 is switch to Tab1 in editor?

  3. 3

    How can we target java 7 with Scene builder 2?

  4. 4

    how to make image buttons on java fxml using scene builder?

  5. 5

    How can we target java 7 with Scene builder 2?

  6. 6

    How can I draw a hexagon in Java Scene Builder 2.0?

  7. 7

    JavaFX + Scene Builder how switch scene

  8. 8

    Java Enable/Disable Button

  9. 9

    enable disable jquery tab using class or id

  10. 10

    How to enable / disable a Preference?

  11. 11

    How to enable or disable services?

  12. 12

    How to enable or disable services?

  13. 13

    How to enable / disable a Preference?

  14. 14

    How to Enable and Disable Buttons

  15. 15

    How to enable/disable a checkbox

  16. 16

    enable tab with multiple input and disable tab with one input

  17. 17

    How to merge cells in JavaFX Scene builder?

  18. 18

    How to build scene builder from openjfx sources

  19. 19

    How to make window fullscreen/maximized in Scene Builder?

  20. 20

    Scene Builder: How to hide borders on panels, etc

  21. 21

    How to merge cells in JavaFX Scene builder?

  22. 22

    How to get a picture over a sphere in Scene Builder

  23. 23

    How to run scene builder standalone in Debian

  24. 24

    How to create an FXML file for an already created new component in java than add it to scene builder?

  25. 25

    How do you change the label text in java using eclipse and scene builder?

  26. 26

    How do I pass two parameters as XML to my controller class on Java Scene Builder?

  27. 27

    Sending data from one tab to another tab in javafx 8 with eclipse and scene builder

  28. 28

    How to enable/disable inputs in blazor

  29. 29

    How to disable and enable keyboard in ubuntu?

HotTag

Archive