JDK-8117684 : Scene can become black for some sizes.
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • Submitted: 2012-09-12
  • Updated: 2015-06-17
  • Resolved: 2013-10-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Look at the attached movie.

I used this app:

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class JavaApplication3 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        Pane pane = new Pane();
        pane.setPrefSize(400, 400);

        ScrollPane sp = new ScrollPane();sp.setFocusTraversable(false);
        sp.setPrefSize(150, 150);
        sp.setContent(createCustomContent(200, 200));

        pane.getChildren().add(sp);

        Scene scene = new Scene(pane, 400, 400);
        stage.setScene(scene);
        stage.show();

    }

    public static Group createCustomContent(int height, int width) {
        Group res = new Group();

        Rectangle r = new Rectangle();
        r.setStroke(Color.BLACK);
        r.setStyle("-fx-border-color: GREEN;");

        res.getChildren().add(r);

        for (int i = 10; i < height; i += 10) {
            Line line1 = new Line(0, i, i - 5, i);
            Line line2 = new Line(i, 0, i, i - 5);
            Line line3 = new Line(i - 5, i, i - 5, height);
            Line line4 = new Line(i, i - 5, width, i - 5);

            line1.setStroke(Color.RED);
            line2.setStroke(Color.YELLOW);
            line3.setStroke(Color.BLUE);
            line4.setStroke(Color.MAGENTA);

            res.getChildren().addAll(line1, line2, line3, line4);
        }

        Rectangle rec = new Rectangle(0, 0, width, height);
        rec.setFill(Color.TRANSPARENT);
        rec.setStroke(Color.RED);

        res.getChildren().add(rec);

        return res;
    }
}

Comments
Confirm, that not reproducible. Close as verified on 8.0b110
07-10-2013

This issue is not observed with the recent FX 8 builds. I checked both Windows (where it was reported) and Mac, with different Prism pipelines (d3d, es2, j2d, sw).
07-10-2013

See RT-30750 for the resize bug.
21-08-2013

Do you see the "contents of Ensemble resizing bug" (forget the JIRA)? If so, I believe that this hides the problem? Also, the new EnsembleApp (ensemble 8) now uses the operating system resize handles so the comment from Feb 21 is no longer right.
21-08-2013

Can anyone still reproduce this problem. I am not able to (Tried Ensemble etc)
21-08-2013

I have been playing around with Ensemble (with a line commented out in the source that restores the default operating resize system handles -- see RT-19342). For me, -Dquantum.multithreaded=false makes it happen much less, but it still seems to happen. Can anyone else confirm this? You need to be patient and resize with the bottom left corner. It seems to happen more when you reverse direction while resizing but this might be my imagination.
21-02-2013

This probably happens always, because the following is enough to reproduce: import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; public class SceneGoesBlack extends Application { @Override public void start(Stage stage) throws Exception { Group pane = new Group(); Scene scene = new Scene(pane, 400, 400); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } } -Dquantum.multithreaded=false fixes it.
12-09-2012