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

Win: Stage.setResizable(false) affects on component layout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • Windows 8.1 64
      Radeon 7850

      Please, look at this code and screenshots.

      When

      primaryStage.setResizable(false);

      is uncommented, frame created with thin white lines on perimeter like on screenshot.

      When this line is commented, all looks fine (also on screenshot)

      Sorry, can't find where to add screenshot, this is code
      /////////////////////////////

      public class Main extends Application {

          final int W = 400;
          final int H = 300;

          @Override
          public void start(Stage primaryStage) throws Exception{

              primaryStage.setTitle("Hello World");

              StackPane root = new StackPane();
              Canvas canvas = new Canvas(W, H);

              root.getChildren().addAll(canvas);

              GraphicsContext graphicsContext = canvas.getGraphicsContext2D();
              graphicsContext.setFill(Color.BLACK);
              graphicsContext.fillRect(0, 0, W, H);

              primaryStage.setScene(new Scene(root, W, H));
              primaryStage.setResizable(false);
              primaryStage.show();
          }


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

      ////////////////////////////

            Unassigned Unassigned
            atyukpiekjfx Anatoliy Tyukpiekov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: