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

SplitMenuButton#setGraphic doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • jdk1.8.0b85

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

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

              Created:
              Updated:
              Resolved:
              Imported: