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

MenuItem javadoc's code samples have errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.1
    • fx2.0.2
    • javafx
    • None
    • 2.0.2 b06

      1. menuItem.setGraphic(new ImageView("path to image"));

      there is no such ImageView constructor, shoud be: menuItem.setGraphic(new ImageView(new Image("path to image")));

      2. two typos in

      final Menu menu1 = new Menu("File");
      menu.getitems().add(menuItem);

      should be

      final Menu menu = new Menu("File");
      menu.getItems().add(menuItem);

            psomashe Parvathi Somashekar (Inactive)
            sgrinev Sergey Grinev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: