Re: White box / window flicker upon launch
Sorry for the delay in responding. I can reproduce this on macOS. I haven't tried on Linux, but I suspect it will reproduce there as well. I added an evaluation to the bug report: https://bugs.openjdk.java.net/browse/JDK-8243939 I don't think this will be an easy bug to fix. In the mean time, the suggested workaround of setting the Scene fill to a color that matches (as closely as possible) the color of the scene as it is initially rendered is the best I can think of. -- Kevin On 4/23/2020 4:52 AM, Dirk Lemmermann wrote: Ticket created: ID 9064689 Dirk On 23 Apr 2020, at 13:40, Dirk Lemmermann 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 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); } }
Re: White box / window flicker upon launch
It doesn't reproduce for me on windows with JavaFX 11.0.2. Whether this is a bug and/or a regression I cannot say. -Original Message- From: Dirk Lemmermann Sent: Thursday, April 23, 2020 10:20 AM To: David Grieve Cc: OpenJFX Subject: [EXTERNAL] Re: White box / window flicker upon launch I tried as you suggested. Problem is still there. > On 23 Apr 2020, at 16:00, David Grieve wrote: > > Another possible workaround is to call Node#applyCss() before stage.show(). > There is an example in the Javadoc for the applyCss() method. > > -Original Message- > From: openjfx-dev On Behalf Of > Dirk Lemmermann > Sent: Wednesday, April 22, 2020 1:46 PM > To: OpenJFX > Subject: [EXTERNAL] White box / window flicker upon launch > > Hi everyone, > > is it just me or did something change in the launch behaviour of JavaFX > applications? It seems we are back to the old “grey box” bug of Swing where > the window would appear first before filling its content. I noticed the same > (but white) effect now for my JavaFX apps, especially when running on mobile > devices via Gluon. Once I saw it there I paid attention to it and also > noticed it when running my desktop apps (on MacOS). I must admit that I am > also not certain if it has been different before. Maybe I simply notice it > now? > > To verify run this little program. You have to pay close attention but if I > am not mistaken then the window first shows up with a white background before > showing its content, which is orange. > > Can somebody confirm? If so, I will create a bug ticket. > > Regards, > > Dirk > > > 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); >} > }
Re: White box / window flicker upon launch
I tried as you suggested. Problem is still there. > On 23 Apr 2020, at 16:00, David Grieve wrote: > > Another possible workaround is to call Node#applyCss() before stage.show(). > There is an example in the Javadoc for the applyCss() method. > > -Original Message- > From: openjfx-dev On Behalf Of Dirk > Lemmermann > Sent: Wednesday, April 22, 2020 1:46 PM > To: OpenJFX > Subject: [EXTERNAL] White box / window flicker upon launch > > Hi everyone, > > is it just me or did something change in the launch behaviour of JavaFX > applications? It seems we are back to the old “grey box” bug of Swing where > the window would appear first before filling its content. I noticed the same > (but white) effect now for my JavaFX apps, especially when running on mobile > devices via Gluon. Once I saw it there I paid attention to it and also > noticed it when running my desktop apps (on MacOS). I must admit that I am > also not certain if it has been different before. Maybe I simply notice it > now? > > To verify run this little program. You have to pay close attention but if I > am not mistaken then the window first shows up with a white background before > showing its content, which is orange. > > Can somebody confirm? If so, I will create a bug ticket. > > Regards, > > Dirk > > > 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); >} > }
Re: White box / window flicker upon launch
I notice the word “workaround” :-) So you would agree it is a bug? And if so …. regression? I never noticed it before. > On 23 Apr 2020, at 16:00, David Grieve wrote: > > Another possible workaround is to call Node#applyCss() before stage.show(). > There is an example in the Javadoc for the applyCss() method. > > -Original Message- > From: openjfx-dev On Behalf Of Dirk > Lemmermann > Sent: Wednesday, April 22, 2020 1:46 PM > To: OpenJFX > Subject: [EXTERNAL] White box / window flicker upon launch > > Hi everyone, > > is it just me or did something change in the launch behaviour of JavaFX > applications? It seems we are back to the old “grey box” bug of Swing where > the window would appear first before filling its content. I noticed the same > (but white) effect now for my JavaFX apps, especially when running on mobile > devices via Gluon. Once I saw it there I paid attention to it and also > noticed it when running my desktop apps (on MacOS). I must admit that I am > also not certain if it has been different before. Maybe I simply notice it > now? > > To verify run this little program. You have to pay close attention but if I > am not mistaken then the window first shows up with a white background before > showing its content, which is orange. > > Can somebody confirm? If so, I will create a bug ticket. > > Regards, > > Dirk > > > 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); >} > }
RE: White box / window flicker upon launch
Another possible workaround is to call Node#applyCss() before stage.show(). There is an example in the Javadoc for the applyCss() method. -Original Message- From: openjfx-dev On Behalf Of Dirk Lemmermann Sent: Wednesday, April 22, 2020 1:46 PM To: OpenJFX Subject: [EXTERNAL] White box / window flicker upon launch Hi everyone, is it just me or did something change in the launch behaviour of JavaFX applications? It seems we are back to the old “grey box” bug of Swing where the window would appear first before filling its content. I noticed the same (but white) effect now for my JavaFX apps, especially when running on mobile devices via Gluon. Once I saw it there I paid attention to it and also noticed it when running my desktop apps (on MacOS). I must admit that I am also not certain if it has been different before. Maybe I simply notice it now? To verify run this little program. You have to pay close attention but if I am not mistaken then the window first shows up with a white background before showing its content, which is orange. Can somebody confirm? If so, I will create a bug ticket. Regards, Dirk 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); } }
Re: White box / window flicker upon launch
Ticket created: ID 9064689 Dirk > On 23 Apr 2020, at 13:40, Dirk Lemmermann 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 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); >>>} >>> } >
Re: White box / window flicker upon launch
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 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); >> } >> }
Re: White box / window flicker upon launch
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); } }
White box / window flicker upon launch
Hi everyone, is it just me or did something change in the launch behaviour of JavaFX applications? It seems we are back to the old “grey box” bug of Swing where the window would appear first before filling its content. I noticed the same (but white) effect now for my JavaFX apps, especially when running on mobile devices via Gluon. Once I saw it there I paid attention to it and also noticed it when running my desktop apps (on MacOS). I must admit that I am also not certain if it has been different before. Maybe I simply notice it now? To verify run this little program. You have to pay close attention but if I am not mistaken then the window first shows up with a white background before showing its content, which is orange. Can somebody confirm? If so, I will create a bug ticket. Regards, Dirk 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); } }