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

Graphic issue in SplitButton with menu item only

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx
    • b36
      jdk6
      windows 7

      To reproduce run following code and click button. Graphic disappear from button.


      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.MenuItem;
      import javafx.scene.control.SplitMenuButton;
      import javafx.scene.layout.VBox;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;

      public class SplitMenuButtonText extends Application {

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

          private Parent getContent() {
              VBox list = new VBox(10);
              list.setTranslateX(20);
              list.setTranslateY(20);
              SplitMenuButton but = new SplitMenuButton(new MenuItem("menu item",new Rectangle(10,10,Color.RED)));
              list.getChildren().add(but);
              
              return list;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              stage.setWidth(200);
              stage.setHeight(200);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.setVisible(true);
          }
      }
       

        1. after click.jpg
          8 kB
          Andrey Nazarov
        2. after mouse over.jpg
          8 kB
          Andrey Nazarov
        3. before click.jpg
          7 kB
          Andrey Nazarov

            leifs Leif Samuelsson (Inactive)
            anazarov Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: