JDK-8114662 : SplitPane: content has 1px margin
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: fx2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-08-09
  • Updated: 2015-06-16
  • Resolved: 2012-03-09
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
Blocks :  
Relates :  
Description
To reproduce run following code
Unexpected: green line between red border and white content



import javafx.application.Application;
import javafx.builders.FlowPaneBuilder;
import javafx.builders.PaneBuilder;
import javafx.builders.SplitPaneBuilder;
import javafx.builders.StackPaneBuilder;
import javafx.builders.TilePaneBuilder;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class SplitPaneTest extends Application {

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

    private Parent getContent() {

        VBox list = new VBox();
        list.setManaged(false);
        SplitPane pane = SplitPaneBuilder.create().items(
                StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.WHITESMOKE)).build(),
                StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.BLUE)).build(),
                StackPaneBuilder.create().style("-fx-background-color:white;").children(new Rectangle(40, 40, Color.RED)).build())
                .prefWidth(150)
                .prefHeight(150)                
                .build();
        pane.setFocusTraversable(false);
        pane.setStyle("-fx-border-color:red; -fx-background-color:green;");
        pane.setMaxSize(150,150);
        list.getChildren().addAll(pane);
        return list;
    }

    public void start(Stage stage) {
        stage.setX(100);
        stage.setY(100);        
        Scene scene = new Scene(getContent(),800,300);
        stage.setScene(scene);
        stage.setVisible(true);
    }
}

Comments
RT-20229 is the cause of this issue
09-03-2012

This is a duplicate of RT-20208. The cause is RT-20229
09-03-2012

Low priority bug and not enough time to fix now. These are Presidio refugees, not Lombard candidates.
19-08-2011

Affected tests: FXCssAutomated/test/css/controls/functional/SplitPaneCssTest/SplitPanes_BACKGROUND_IMAGE FXCssAutomated/test/css/controls/functional/SplitPaneCssTest/SplitPanes_BACKGROUND_INSET FXCssAutomated/test/css/controls/functional/SplitPaneCssTest/SplitPanes_BACKGROUND_REPEAT_ROUND
09-08-2011