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

Graphic issue in SplitButton with menu item only

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      b36
      jdk6
      windows 7

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: