Is there a way to remove the default space (padding/margin) that JavaFX label adds? I want to get rid of the space displayed between the black lines on the image below:
One of the more dynamic ways to do this is to use a Text instead of a Label and set the boundsType as VISUAL. This results in a Text without any padding on the any of the sides of the Text, irrespective of the font size.
Text text = new Text();
text.setBoundsType(TextBoundsType.VISUAL);