FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Intel HD Graphics 4000
A DESCRIPTION OF THE PROBLEM :
Most likely this is a duplicate of this bug: https://bugs.openjdk.java.net/browse/JDK-8093776
But I was not able to add any comment or description.
An undecorated stage flickers in a way, that it draws a black background for the whole client area. The black background gets overdrawn by the actual scene contents immediately, but sometimes it's visible for a short time. This causes the flickering. Flickering increases as the window grows in size.
There is no flickering if the stage is decorated.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following source code on Windows.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No flickering visible as with decorated stages.
ACTUAL -
Flickering
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class StageFlicker extends Application {
public void start(Stage primaryStage) throws Exception {
primaryStage.initStyle(StageStyle.UNDECORATED);
Label label = new Label("Drag me to resize");
AnchorPane.setRightAnchor(label, 0.0);
AnchorPane.setBottomAnchor(label, 0.0);
label.setOnMouseDragged(e -> {
primaryStage.setWidth(e.getScreenX() - primaryStage.getX());
primaryStage.setHeight(e.getScreenY() - primaryStage.getY());
});
primaryStage.setScene(new Scene(new AnchorPane(label)));
primaryStage.setWidth(400);
primaryStage.setHeight(300);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No workaround found