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

SplitMenuButton#setGraphic doesn't work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      jdk1.8.0b85

      Description

      import com.sun.javafx.runtime.VersionInfo;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.SplitMenuButton;
      import javafx.scene.layout.StackPane;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;

      public class Main extends Application {

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

          @Override
          public void start(Stage stage) throws Exception {
              stage.setTitle(VersionInfo.getRuntimeVersion());
              stage.setScene(createScene());
              stage.show();
          }

          private Scene createScene() {
              SplitMenuButton smb = new SplitMenuButton();
              
              smb.setText("test");
              
              smb.setGraphic(new Rectangle(10, 10, Color.RED));
              
              return new Scene(new StackPane(smb));
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              psomashe Parvathi Somashekar (Inactive)
              Reporter:
              dzinkevi Dmitry Zinkevich (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: