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

Click on button opens context menu

    XMLWordPrintable

Details

    Description

      To reproduce run following code and push button

      public class JavaFX extends Application {

         
          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage primaryStage) {
              Button btn = new Button();
              btn.setContextMenu(new ContextMenu(new CheckMenuItem("Hello")));
              btn.setText("Hello World'");
              
              
              StackPane root = new StackPane();
              root.getChildren().add(btn);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }
      }

      Attachments

        Activity

          People

            miflemi Mick Fleming
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: