Default jssfffxfxml graphics for some controls

I am trying to use JavaFX Scene Builder to create a UI for my application. I am using a CSS file to manage styles in my interface. I noticed that some controls ( TableView

, TreeView

) have a gray border by default which I don't want.

I tried to install -fx-border-style: none;

and -fx-border-width: 0;

none of them worked. Then I tried to set the border color for the individual sides ( -fx-border-right-color:#FFF;

), but that didn't work either. The only thing I can change is the border color for all sides.

Does anyone know how to get rid of the default border, as well as how to create a border for the individual sides of these controls?

+3


source to share


1 answer


the following worked for me:

TreeView tv = (TreeView) scene.lookup("#myTree");

// ... setup your tree

tv.setStyle("-fx-border-style: none; -fx-background-color:transparent;");

      



NTN,

+1


source







All Articles