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

[Mavericks, Yosemite] Showing a stage on a retina screen is sometimes scaled twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8u40
    • 8u25
    • javafx
    • Mac OS X 10.10, 10.9.5

      Stages sometimes appear at four times the expected resolution when using retina screens. The issue occurs when a stage is shown on a retina screen while a non-retina screen is in focus.

      Reproduction steps:

      1) Set the retina screen as the primary screen and connect an external (non-retina) monitor
      2) Run the sample code below from an IDE or console that's located on the external (non-retina) monitor.

      Result: The button will show at four times the expected size (but the size of the stage is correct).

      public class TestRetina extends Application {

      @Override
      public void start(Stage primaryStage) throws Exception {
      Button button = new Button("This is a test");

      StackPane stackPane = new StackPane(button);

      Scene scene = new Scene(stackPane);

      primaryStage.setScene(scene);

      primaryStage.show();
      }

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

            flar Jim Graham
            djujfx Dennis Ju (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: