Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8208078

Button is not rendered as "enabled" only on Dialog not Stage

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b27
    • Introduced In Version:
      10
    • CPU:
      x86_64
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 7. jdk 10.0.2

      A DESCRIPTION OF THE PROBLEM :
      Create some button on a Dialog and setDisable(true). Button will be rendered as "disabled" appropriately. Then make the button setDisable(false). But the button is still rendered as "disabled" not "enabled".


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute attached sample code both on jre1.8.0_111 and jre_10.0.2. Click button "two".
      "one" will be rendered as "enabled" under jre1.8.0_111.
      "one" will be still rendered as "disabled" under 10.0.2. But actually "one" is clickable.





      ---------- BEGIN SOURCE ----------
      import javafx.application.*;
      import javafx.scene.control.*;
      import javafx.scene.layout.*;
      import javafx.stage.*;

      public class Sample extends Application {
        
        public void start(Stage stage) throws Exception {
          FlowPane flowPane = new FlowPane();
          Button one = new Button("one");
          one.setDisable(true);
          Button two = new Button("two");
          two.setOnAction(e->one.setDisable(false));
          Label label = new Label(System.getProperty("java.version"));
          flowPane.getChildren().addAll(one, two, label);
          Dialog<?> dialog = new Dialog<>();
          dialog.getDialogPane().setContent(flowPane);
          dialog.show();
        }
        
        public static void main(String[] args) {
          Application.launch(Sample.class, args);
        }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      none


      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmangal Priyanka Mangal (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: