White box / window flicker upon launch
Dirk Lemmermann
dlemmermann at gmail.com
Thu Apr 23 11:52:51 UTC 2020
Ticket created: ID 9064689
Dirk
> On 23 Apr 2020, at 13:40, Dirk Lemmermann <dlemmermann at gmail.com> wrote:
>
> I think this is a bug … I will create a ticket for it. When this behaviour was fixed for Swing in Java 6 it made a huge difference in the perception of the quality and performance of Java applications. Could do the same for JavaFX.
>
> Dirk
>
>
>> On 22 Apr 2020, at 20:17, Tom Schindl <tom.schindl at bestsolution.at> wrote:
>>
>> yes I do but I think this is by nature:
>>
>> a) you use CSS so only after the first CSS-Pass the color could be set
>> appropriately, this CSS pass could happen after the Native-Window is
>> shown
>> => you can mitigate that a bit using
>> root.setBackground(new Background(new BackgroundFill(Color.ORANGE,
>> CornerRadii.EMPTY, Insets.EMPTY)));
>>
>> b) if the above gives you short flash (IMHO shorter than with CSS) and
>> you can see that by setting eg RED or GREEN as the Scene-Fill so then
>> it gets more prominent
>>
>> So the flash is gone if you put the same color to Scene.setFill() as your root-Pane but now something slightly unexpected happens. The trim is colored slighly in your scene-color ;-)
>>
>> Tom
>>
>> Am 22.04.20 um 19:46 schrieb Dirk Lemmermann:
>>> import javafx.application.Application;
>>> import javafx.scene.Scene;
>>> import javafx.scene.layout.VBox;
>>> import javafx.stage.Stage;
>>> public class BugDemo extends Application {
>>> public void start(Stage stage) {
>>> VBox root = new VBox();
>>> root.setStyle("-fx-background-color: orange;");
>>> Scene scene = new Scene(root, 1000, 800);
>>> stage.setScene(scene);
>>> stage.show();
>>> }
>>> public static void main(String[] args) {
>>> launch(args);
>>> }
>>> }
>
More information about the openjfx-dev
mailing list