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

[Quantum] White flashing when opening a stage with dark background

XMLWordPrintable

    • b145

      The following code opens a stage with a dark background color. On my system (see environment) this results in a white flashing when the stage is shown, i.e. there appears to be at least one paint operation before the background color has been applied. This is a show-stopper for delivering our commercial product quality-wise.

      {code}
      import javafx.application.Application;
      import javafx.geometry.Insets;
      import javafx.scene.Scene;
      import javafx.scene.layout.Background;
      import javafx.scene.layout.BackgroundFill;
      import javafx.scene.layout.CornerRadii;
      import javafx.scene.layout.StackPane;
      import javafx.scene.paint.Color;
      import javafx.stage.Stage;

      public class JFXFlashTest extends Application {

          @Override
          public void start(Stage primaryStage) throws Exception {
              final StackPane pane = new StackPane();
              pane.setBackground(new Background(new BackgroundFill(Color.rgb(54, 54, 54), CornerRadii.EMPTY, Insets.EMPTY)));
              final Scene scene = new Scene(pane, 1024, 768);
              primaryStage.setScene(scene);
              primaryStage.show();
          }

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

        There are no Sub-Tasks for this issue.

            ckyang Chien Yang (Inactive)
            rkruegerjfx Robert Krueger (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: