I'm having a weird issue with JavaFX (jdk8, build 117): once the monitor resumes from standby the JavaFX stage/scene is blank.
I've tried minimizing/resizing the window but the contents are no longer displayed. I'm using a simple scene with a StackPane.
    root = new StackPane();
    root.setBackground(null);
    scene = new Scene(root, Color.BLACK);
    stage.setScene(scene);
    ProgressIndicator piLoader = new ProgressIndicator();
    piLoader.setMaxSize(32d, 32d);
    root.getChildren().add(piLoader);
    stage.show();
I've tried searching for a known bug or a previous report but could not find any.
JDK8 is still very much in flux & marked as an early access release, so issues like this should be expected. I've just tested it on JDK8 built b121 (Win8 64bit & Ubuntu 13.10 64bit) and it appears to be fine.
Update your JDK version to the latest & see if that resolves the issue for you.
UPDATE: Here's a full stock-standard example that works without problem for me, monitor goes into sleep mode & comes back without any display issues. 'Sleep mode' is the only option Windows 8 is giving me, so not 'Standby' as you're referring to. Which OS are you using?
package helloworld;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class HelloWorld extends Application {
    @Override
    public void start(Stage primaryStage) {
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
        StackPane root = new StackPane();
        root.setBackground(null);
        root.getChildren().add(btn);
        ProgressIndicator piLoader = new ProgressIndicator();
        piLoader.setMaxSize(32d, 32d);
        root.getChildren().add(piLoader);
        Scene scene = new Scene(root, 300, 250, Color.BLACK);
        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With