borderWidth, BorderColor and radius are retrieved also using CSSUtils, like this:
B4X:
Dim radius As String = CSSUtils.GetStyleProperty(mBase,"border-radius")
Dim BorderWidth As String = CSSUtils.GetStyleProperty(mBase,"border-width")
Dim BorderColor As String = CSSUtils.GetStyleProperty(mBase,"border-color")
The problem is that fx.Colors.From32Bit returns a Color object and not a Paint object.
Try this instead:
B4X:
Dim BorderColor As String = CSSUtils.GetStyleProperty(Pane1,"border-color")
Log(BorderColor)
Dim Paint As JavaObject
Paint.InitializeStatic("javafx.scene.paint.Paint")
CSSUtils.SetBorder(Pane2,1,Paint.RunMethod("valueOf",Array(BorderColor)),0)
Just a test to copy the colour from one border to another, but you'll get the idea.
I found a solution...
Funny enough, it was one of my own answers a few months ago to a similar problem.
B4X:
Private Sub GetColor(hex As String) As Paint
Dim r,g,b As Int
r = Bit.ParseInt(hex.SubString2(0,2), 16)
g = Bit.ParseInt(hex.SubString2(2,4), 16)
b = Bit.ParseInt(hex.SubString2(4,6), 16)
Return fx.Colors.RGB(r, g, b)
End Sub