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

MenuItem javadoc's code samples have errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: fx2.0.2
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      2.0.2 b06

      Description

      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);

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: