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

MenuItem text doesn't show the first underscore "_" character

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: tbd_major
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 8.1 64 bits
      Java 1.8.0_40

      Description

      When I set the text property of a MenuItem with a string that contains more than one underscore character, the first underscore is never displayed.


      HOW TO TEST (USE THE FOLLOWING CODE) :


      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Menu;
      import javafx.scene.control.MenuBar;
      import javafx.scene.control.MenuItem;
      import javafx.stage.Stage;


      public class Main extends Application {
      @Override
      public void start(Stage primaryStage) {
      MenuBar menubar = new MenuBar();
      Menu menu = new Menu("Test");

      MenuItem menuItemTest = new MenuItem("abcd_efgh_ijkl_mnop");

      menu.getItems().add(menuItemTest);
      menubar.getMenus().add(menu);

      Scene scene = new Scene(menubar, 400, 400);
      primaryStage.setScene(scene);
      primaryStage.show();
      }

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


      EXPECTED RESULT:

      The menuitem text displayed is "abcd_efgh_ijkl_mnop"


      ACTUAL RESULT:

      The menuitem text displayed is "abcdefgh_ijkl_mnop"

        Attachments

          Activity

            People

            • Assignee:
              slions Sandra Lions-piron
              Reporter:
              jbahatijfx Jiva Bahati (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: