I'm trying to make a line of text which consists of a name and a string of text. I want the name to be a hyperlink and the rest to be just plain text.
I thought TextFlow would be good for this, but the problem is it automatically puts a single space between the hyperlink and the text. What if I want the TextFlow to be for example
Jane's awesome
The TextFlow will make that a
Jane 's awesome
Is there a method or CSS property to disable this behaviour?
Solution
You can remove the padding via a CSS style:
Or you can do it in code if you wish:
Background
The default setting can be found in the
modena.css
file in thejfxrt.jar
file packaged with your JRE distribution and it is:Sample application
In the sample screenshot the second hyperlink has focus (hence its dashed border).