-
Bug
-
Resolution: Fixed
-
P4
-
8u20
-
Windows 7, Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b05)
I have a GridPane with 2 children (in 2 columns, each 50% wide), itself inside a SplitPane. For some application widths, the right-most pixels of the right child of the grid pane are cut off.
See the attached application. Note that when changing the width of the application, the right-border sometimes vanishes.
------------------
Ok so I can't attach stuff. I'm pasting the code here.
------------------
package gridpanebug;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class GridPaneBug extends Application {
public static void main(final String[] args) {
launch(args);
}
@Override
public void start(final Stage stage) throws Exception {
final Parent parent = FXMLLoader.load(getClass().getResource("GridPaneBug.fxml"));
stage.setScene(new Scene(parent, 1024, 768));
stage.show();
}
}
------------------
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<SplitPane xmlns:fx="http://javafx.com/fxml" style="-fx-padding: 20;">
<items>
<GridPane fx:id="gridPane" hgap="10">
<StackPane fx:id="firstChild" GridPane.columnIndex="0" GridPane.rowIndex="1" GridPane.vgrow="ALWAYS" style="-fx-border-color: black;"/>
<StackPane fx:id="secondChild" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.vgrow="ALWAYS" style="-fx-border-color: black;"/>
<columnConstraints>
<ColumnConstraints percentWidth="50" />
<ColumnConstraints percentWidth="50" />
</columnConstraints>
</GridPane>
</items>
</SplitPane>
See the attached application. Note that when changing the width of the application, the right-border sometimes vanishes.
------------------
Ok so I can't attach stuff. I'm pasting the code here.
------------------
package gridpanebug;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class GridPaneBug extends Application {
public static void main(final String[] args) {
launch(args);
}
@Override
public void start(final Stage stage) throws Exception {
final Parent parent = FXMLLoader.load(getClass().getResource("GridPaneBug.fxml"));
stage.setScene(new Scene(parent, 1024, 768));
stage.show();
}
}
------------------
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<SplitPane xmlns:fx="http://javafx.com/fxml" style="-fx-padding: 20;">
<items>
<GridPane fx:id="gridPane" hgap="10">
<StackPane fx:id="firstChild" GridPane.columnIndex="0" GridPane.rowIndex="1" GridPane.vgrow="ALWAYS" style="-fx-border-color: black;"/>
<StackPane fx:id="secondChild" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.vgrow="ALWAYS" style="-fx-border-color: black;"/>
<columnConstraints>
<ColumnConstraints percentWidth="50" />
<ColumnConstraints percentWidth="50" />
</columnConstraints>
</GridPane>
</items>
</SplitPane>