How to deactivate a TextField and a Label by Combobox selection in javafx
<p>I would like to deactivate a TextField and its Label by a specific selection pre defined in my combobox in my JavaFX application.
i have already tried the below code but its not working..</p>

<pre><code>   public class Controller extends Application {
    @FXML
    private ComboBox&lt;String&gt;cmb1;
    @FXML
    private ComboBox&lt;String&gt;cmb2;
    @FXML
    private Button btn1,btn2;
    @FXML
    private TextField tf1,tf2,tf3,tf4,tf5,tf6;
    @FXML
    String v1,v2,v3,v4,v5,v6,cm1,cm2;
    @FXML
    private Label l6,l7;

    @Override
    public void start(Stage primaryStage) throws Exception {
    }

    private void play()
    {
        String check="Uwt-0";
        System.out.println("play control");
        tf5.setEditable(false);
        tf6.setEditable(false);
        //tf5.setVisible(false);
        //tf6.setVisible(false);
    }
    public void submit(ActionEvent event) {

        System.out.println("Submit Button Pressed");
        v1=tf1.getText();
        v2=tf2.getText();
        v3=tf3.getText();
        v4=tf4.getText();
        v5=tf5.getText();
        v6=tf6.getText();

        cm1=cmb1.getSelectionModel().getSelectedItem();
        cm2=cmb2.getSelectionModel().getSelectedItem();
        if(v1.isEmpty()||v2.isEmpty()||v3.isEmpty()||v4.isEmpty()||v5.isEmpty()||v6.isEmpty()||cmb1.getSelectionModel().getSelectedItem()==null||null==cmb2.getSelectionModel().getSelectedItem())
        {
            AlertBox.display("Error Dialouge", "Set All The Parameters");
               System.out.println("Submit Button Clicked Without Filling All Parameters..");
        }
        else
        {   
        System.out.println(v1 +"\n"+ v2+"\n"+v3+"\n"+cm1+"\n"+cm2+"\n"+v4+"\n"+v5+"\n"+v6);
        }
    }
    public void clear(ActionEvent event)
    {
        System.out.println("Clear Button Pressed");
        tf1.setText(null);
        tf2.setText(null);
        tf3.setText(null);
        tf4.setText(null);
        tf5.setText(null);
        tf6.setText(null);

        cmb1.setValue(null);
        cmb2.setValue(null);
    }
    //Action for second combobox fx:id-cmb2
    public void handle(ActionEvent event)
    {
        System.out.println("Control Here");
        if(cmb2.getSelectionModel().getSelectedItem()=="Uwt-0")
        {

        tf5.setEditable(false);
        tf6.setEditable(false);
        }
    }
</code></pre>

<p>}
i have also tried this post:<a href="https://stackoverflow.com/questions/32451986/how-to-hide-or-deactivate-a-textfield-and-a-label-with-javafx">How to hide or deactivate a TextField and a Label with javafx</a></p>

<p>still its not working..</p>