FULL PRODUCT VERSION :
I tested the following code using the JDK 1.8.0_91, the JDK 1.8.0_111 and the actual JDK 1.8.0_112.
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 10 [Version 10.0.14393]
Microsoft Windows 8 [Version 6.3.9600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
I use IntelliJ IDEA IDE.
A DESCRIPTION OF THE PROBLEM :
Please try the following **FXML view** with the corresponding controller. The source code demonstrates that when reducing the area of the left content of the SplitPane by divider, the content is not visible from the beginning or is not visible at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please try source code filled in **Source code for an executable test case**.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The left content of the SplitPane is always visible. When reducing the area of the left content of the SplitPane by divider, the parent ScrollPane vertical scrollbar grows.
ACTUAL -
The left content of the SplitPane is not always visible.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message nor crash.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
// === sample.fxml ====================================================
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.text.Text?>
<ScrollPane fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml"
fitToWidth="true"
fitToHeight="true">
<SplitPane>
<GridPane fx:id="gridPane" />
<VBox>
<Text>Right</Text>
<Text>Content</Text>
</VBox>
</SplitPane>
</ScrollPane>
// === Controller.java ====================================================
package sample;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.GridPane;
import javafx.scene.text.Text;
import java.net.URL;
import java.util.ResourceBundle;
public class Controller implements Initializable {
@FXML
private GridPane gridPane;
private String[] splittedText;
@Override
public void initialize(URL location, ResourceBundle resources) {
// From Wikipedia
final String text = "Dolphins are a widely distributed and diverse group of aquatic mammals. They are an informal grouping within the order Cetacea, excluding whales and porpoises, so to zoologists the grouping is paraphyletic. The dolphins comprise the extant families Delphinidae (the oceanic dolphins), Platanistidae (the Indian river dolphins), Iniidae (the new world river dolphins), and Pontoporiidae (the brackish dolphins). There are 40 extant species of dolphins. Dolphins, alongside other cetaceans, belong to the clade Cetartiodactyla with even-toed ungulates.";
splittedText = text.split(" ");
for (int i = 0; i < 20; ++i) {
gridPane.add(new Text(Integer.toString(i)), 0, i);
gridPane.add(createFlowPane(), 1, i);
}
}
private FlowPane createFlowPane() {
FlowPane flowPane = new FlowPane();
for (int i = 0; i < splittedText.length; ++i)
flowPane.getChildren().add(new Text(splittedText[i]));
return flowPane;
}
}
// === Main.java ====================================================
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("SplitPane Test");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
I tested the following code using the JDK 1.8.0_91, the JDK 1.8.0_111 and the actual JDK 1.8.0_112.
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 10 [Version 10.0.14393]
Microsoft Windows 8 [Version 6.3.9600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
I use IntelliJ IDEA IDE.
A DESCRIPTION OF THE PROBLEM :
Please try the following **FXML view** with the corresponding controller. The source code demonstrates that when reducing the area of the left content of the SplitPane by divider, the content is not visible from the beginning or is not visible at all.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please try source code filled in **Source code for an executable test case**.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The left content of the SplitPane is always visible. When reducing the area of the left content of the SplitPane by divider, the parent ScrollPane vertical scrollbar grows.
ACTUAL -
The left content of the SplitPane is not always visible.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message nor crash.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
// === sample.fxml ====================================================
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.text.Text?>
<ScrollPane fx:controller="sample.Controller"
xmlns:fx="http://javafx.com/fxml"
fitToWidth="true"
fitToHeight="true">
<SplitPane>
<GridPane fx:id="gridPane" />
<VBox>
<Text>Right</Text>
<Text>Content</Text>
</VBox>
</SplitPane>
</ScrollPane>
// === Controller.java ====================================================
package sample;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.GridPane;
import javafx.scene.text.Text;
import java.net.URL;
import java.util.ResourceBundle;
public class Controller implements Initializable {
@FXML
private GridPane gridPane;
private String[] splittedText;
@Override
public void initialize(URL location, ResourceBundle resources) {
// From Wikipedia
final String text = "Dolphins are a widely distributed and diverse group of aquatic mammals. They are an informal grouping within the order Cetacea, excluding whales and porpoises, so to zoologists the grouping is paraphyletic. The dolphins comprise the extant families Delphinidae (the oceanic dolphins), Platanistidae (the Indian river dolphins), Iniidae (the new world river dolphins), and Pontoporiidae (the brackish dolphins). There are 40 extant species of dolphins. Dolphins, alongside other cetaceans, belong to the clade Cetartiodactyla with even-toed ungulates.";
splittedText = text.split(" ");
for (int i = 0; i < 20; ++i) {
gridPane.add(new Text(Integer.toString(i)), 0, i);
gridPane.add(createFlowPane(), 1, i);
}
}
private FlowPane createFlowPane() {
FlowPane flowPane = new FlowPane();
for (int i = 0; i < splittedText.length; ++i)
flowPane.getChildren().add(new Text(splittedText[i]));
return flowPane;
}
}
// === Main.java ====================================================
package sample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
primaryStage.setTitle("SplitPane Test");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8172235 When WebView is scrolled to bottom and window resizes to a larger size, JavaFX controls stop rendering correctly
-
- Closed
-