-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8
-
build 1.8.0-ea-b123, tried on windows 64-bit and Ubuntu 32 bit
In the following small example the root is AnchorPane (background is yellow, but it is not visible). It contains a
ScrollPane with green background. The ScrollPane contains an AnchorPane with red background, fixed height and width, the witdth is smaller than the width of the ScrollPane. If you start the example with JDK 8 the background of the ScrollPane where not covered with the red AnchorPane is not green. When you scroll down vertically using the scroll bar green lines appear in this area.
With JDK 7 the background is green and there are no lines. The example consist of a java file and an fxml.
Example java file:
package scrollpanetest;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("test.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
FXML file (test.fxml):
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: yellow" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2">
<children>
<ScrollPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: lightgreen" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<AnchorPane id="Content" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1000.0" prefWidth="100.0" style="-fx-background-color: red" />
</content>
</ScrollPane>
</children>
</AnchorPane>
ScrollPane with green background. The ScrollPane contains an AnchorPane with red background, fixed height and width, the witdth is smaller than the width of the ScrollPane. If you start the example with JDK 8 the background of the ScrollPane where not covered with the red AnchorPane is not green. When you scroll down vertically using the scroll bar green lines appear in this area.
With JDK 7 the background is green and there are no lines. The example consist of a java file and an fxml.
Example java file:
package scrollpanetest;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("test.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
FXML file (test.fxml):
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: yellow" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2">
<children>
<ScrollPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: lightgreen" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<AnchorPane id="Content" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1000.0" prefWidth="100.0" style="-fx-background-color: red" />
</content>
</ScrollPane>
</children>
</AnchorPane>
- duplicates
-
JDK-8094222 [ScrollPane] ScrollPane can leave trails of horizontal lines.
- Resolved