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

[Menu] Menu disappears immediately after opening.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      jdk1.8.0 b76
      Ubuntu 12.04

      Description

      To reproduce just click the menu. It will open and then it will close.

      public class MenuItemTest extends Application {
          
          @Override
          public void start(Stage primaryStage) {
              
              Parent root = createScene();
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle(VersionInfo.getRuntimeVersion());
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }

          private Parent createScene() {
              
              Menu menu = new Menu("Menu");
              
              for (int i = 0; i < 10; i++) {
                  MenuItem menuItem = new MenuItem("Item - 0x1" + i);
                  menu.getItems().add(menuItem);
              }
              
              MenuBar menuBar = new MenuBar();
              menuBar.getMenus().add(menu);
              
              HBox root = new HBox(5);
              root.getChildren().add(menuBar);
              
              return root;
          }
      }

        Attachments

        1. menu.mov
          282 kB
          Parvathi Somashekar

          Activity

            People

            • Assignee:
              psomashe Parvathi Somashekar (Inactive)
              Reporter:
              dzinkevi Dmitry Zinkevich (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: