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

[MenuButton, SplitMenuButton] text is shown at wrong position

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 7u6
    • 7u6
    • javafx
    • Linux Ubuntu 12.04x86, JDK7, JavaFX 2.2.0b08.

      Run this code:


      package menubutton;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.MenuButton;
      import javafx.scene.control.MenuItem;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class MenuButtonApp extends Application{

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

          @Override
          public void start(Stage stage) throws Exception {
              VBox vb = new VBox();
              MenuButton mb = new MenuButton();
              mb.getItems().addAll(new MenuItem("Item 1"), new MenuItem("Item 12"), new MenuItem("Item 3"));
              vb.getChildren().add(mb);
              mb.setText("SomeText");
              
              mb.setTranslateX(100);mb.setTranslateY(100);
              Scene scene = new Scene(vb, 300, 300);
              stage.setScene(scene);
              stage.show();
          }
      }

            dgrieve David Grieve
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: