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

Win: Stage ignores scene's width/height, if it is shown while iconified

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u6
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7

      Description

      When I open a stage with setIconified(true), the Stage has always the (huge) default size, when I open it manually afterwards.

      The scene's width and height are ignored.


      Sample code:


      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.Label;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;


      public class TestApp3 extends Application {

          @Override
          public void start(final Stage stage) throws Exception {

              final VBox root = new VBox();

              Button button = new Button();
              button.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent actionEvent) {
                      Stage subStage = new Stage();

                      Label label = new Label("TEST");

                      Scene scene = new Scene(label, 300, 300);
                      subStage.setScene(scene);

                      subStage.setIconified(true);
                      subStage.show();
                  }
              });

              root.getChildren().add(button);
              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.show();
          }


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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cschudtjfx Christian Schudt (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: