This probably causes RT-34453.
Vertical separator draws itself horizontally when in layout together with a horizontal Separator and a Button with a Path inside. Removing any of the components fixes the problem.
Minimal FXML code demonstrating the issue:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.*?>
<VBox fillWidth="false" spacing="5.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button text="Button">
<graphic>
<Path />
</graphic>
</Button>
<Separator />
<Separator orientation="VERTICAL" />
</children>
</VBox>
Minimal code for demo application without using FXML:
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Separator;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Path;
import javafx.stage.Stage;
public class Test extends Application
{
public static void main(String[] args)
{
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception
{
final VBox vbox = new VBox(5.0);
final Button button = new Button("Button", new Path());
final Separator horizontalSeparator = new Separator(Orientation.HORIZONTAL);
final Separator verticalSeparator = new Separator(Orientation.VERTICAL);
vbox.getChildren().addAll(button, horizontalSeparator, verticalSeparator);
primaryStage.setScene(new Scene(vbox));
primaryStage.show();
}
}
This code creates a Button with a Path inside, one horizontal and one vertical Separator and puts them into a VBox. The result will most likely look like this (the vertical separator is displayed as a short horizontal line):
http://i57.tinypic.com/szbih1.png
It also works the other way: Setting the first Separator's orientation to vertical makes the second one being drawn vertically too.
Vertical separator draws itself horizontally when in layout together with a horizontal Separator and a Button with a Path inside. Removing any of the components fixes the problem.
Minimal FXML code demonstrating the issue:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.*?>
<VBox fillWidth="false" spacing="5.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button text="Button">
<graphic>
<Path />
</graphic>
</Button>
<Separator />
<Separator orientation="VERTICAL" />
</children>
</VBox>
Minimal code for demo application without using FXML:
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Separator;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Path;
import javafx.stage.Stage;
public class Test extends Application
{
public static void main(String[] args)
{
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception
{
final VBox vbox = new VBox(5.0);
final Button button = new Button("Button", new Path());
final Separator horizontalSeparator = new Separator(Orientation.HORIZONTAL);
final Separator verticalSeparator = new Separator(Orientation.VERTICAL);
vbox.getChildren().addAll(button, horizontalSeparator, verticalSeparator);
primaryStage.setScene(new Scene(vbox));
primaryStage.show();
}
}
This code creates a Button with a Path inside, one horizontal and one vertical Separator and puts them into a VBox. The result will most likely look like this (the vertical separator is displayed as a short horizontal line):
http://i57.tinypic.com/szbih1.png
It also works the other way: Setting the first Separator's orientation to vertical makes the second one being drawn vertically too.
- relates to
-
JDK-8088881 Vertical separator in Modena.jar not rendered correctly
-
- Open
-