JDK8 is still very popular and marked as an early release, so you should expect such problems. I just tested it on a JDK8 built by b121 (Win8 64bit and Ubuntu 13.10 64 bit) and it seems like this is normal.
Upgrade your JDK version to the latest version and see if this solves your problem.
UPDATE: here is the complete standard standard that works without problems for me, the monitor goes into sleep mode and returns without any display problems. Hibernation is the only option Windows 8 gives me, so itโs not โStandby,โ as you say. What 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(); } public static void main(String[] args) { launch(args); } }
source share