Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove border from SplitPane

Tags:

javafx

I’ve already done some research on the subject and found a post that could’ve been relevant, had it only contained the sort of answer I’m after. I’m looking to remove the border around SplitPanes, that get bigger the more SplitPanes you create within one another.

Here’s what happens:

enter image description here

The grey in the picture is the SplitPane dividers. The red is the borders I’m attempting to remove completely.

The post I’ve attached had the solution:

-fx-box-border: transparent;

With a question like that, you’d expect to find an answer explaining how it’s removed completely. That piece of code only switched the color of the border into transparent—meaning it’s still there!

Perhaps someone could point me in the right direction as to how one would go about removing the border around SplitPanes completely?

like image 594
D. Ataro Avatar asked Aug 22 '26 10:08

D. Ataro


1 Answers

Guess what? Right after posting, I came across the modena.css stylesheet for the current version of Java FX. Looks as though my research wasn’t good enough after all.

Here’s the solution:

.split-pane
{
    -fx-padding: 0;
}

And as if by magic—the silly border has been removed!

like image 68
D. Ataro Avatar answered Aug 26 '26 21:08

D. Ataro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!