[MenuButton, SplitMenuButton] text is shown at wrong position

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 7u6
    • Affects Version/s: 7u6
    • Component/s: javafx
    • Environment:

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

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

              Created:
              Updated:
              Resolved:
              Imported: