To reproduce run following code
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Separator;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class SeparatorBorder extends Application {
public static void main(String[] args) {
launch( args);
}
private Parent getContent() {
VBox box = new VBox(10);
Separator separator=new Separator();
separator.setStyle("-fx-border-color:red; -fx-border-width: 2;");
box.getChildren().add(separator);
return box;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(300);
stage.setHeight(300);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
}
}
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Separator;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class SeparatorBorder extends Application {
public static void main(String[] args) {
launch( args);
}
private Parent getContent() {
VBox box = new VBox(10);
Separator separator=new Separator();
separator.setStyle("-fx-border-color:red; -fx-border-width: 2;");
box.getChildren().add(separator);
return box;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(300);
stage.setHeight(300);
Scene scene = new Scene(getContent());
stage.setScene(scene);
stage.setVisible(true);
}
}
- duplicates
-
JDK-8112774 Region: border is rendered behind content
-
- Closed
-
- is blocked by
-
JDK-8114683 Region should support insets property that adds border and padding together
-
- Closed
-