I like the 3D effect of a JTextField with Borders created by BorderFactory.createLoweredBevelBorder(). Now that I’m working with JavaFX instead, the L&F of the border is controlled by CSS. And the default look is just a simple line stroke border. I figured out how to edit the CSS file to thicken the border and change its color:
.text-field { -fx-border-color: color; -fx-border-width: #; }
But if you look at a Swing-generated lowered bevel effect it is created by having different colors on 2 of the 4 sides and having the edge barrier at a 45 degree angle. So how do I accomplish that with CSS?
The JavaFX CSS Reference Guide says:
borderorborder-topand others are ones in this unsupported category.To have a lowered bevel border try
Or try with JavaFX-style way using inner shadow
However the real style you wanted can be achieved by
-fx-border-styleattribute IMO. Refer to it in over mentioned guide.