How to remove shadow from JavaFX tabs?


I have tabs in JavaFX and I want to set a style to remove the shadows:

enter image description here

If you look at the left side of foo, you can see shadows.

This is my current style:

.tab {
    -fx-background-color: #393939;
    -fx-border-color: #282828;
    -fx-border-width: 0;
    -fx-padding: 1 8;

I've tried to look into the documentation, but could not find a way to remove shadows:

8/28/2012 5:47:10 PM

Accepted Answer

To find the default stylesheet, search for the file jfxrt.jar on your computer, open it in an archiver like WinRAR and open com/sun/javafx/scene/control/skin/caspian.css. With this knowledge, you can easily see what could be there that causes the issue.

caspian.css is also available online, here is the a link to the JavaFX 2.2 version.

Now, add this style:

.tab-pane .headers-region {
    -fx-effect: null;

It removes the default style and the shadows are gone.

8/29/2012 4:32:33 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow