Starting point:
- GridPane with 2 Columns
- each Column has a Label
Like-to-have output:
- space between the labels filled by dots
So far I have only come across String solutions in which the target length of the combined String is known. But this case doesn't do it for me because I need a solution which can also works when screen size changes and therefore the space between Labels do change dynamically. Could you guys please point me to the right direction?
You could put the 2
Label
s in aHBox
with aRegion
in between them, sethgrow
for the labels and theRegion
toNEVER
andALWAYS
respectively and use a linear gradient as background for the region that draws half of it's size black and the other half transparent.Example
You could also use a border (top only) on the
Region
instead of using a background and do not setprefHeight
. This would allow you to actually use dots instead of strokes, but since your picture shows strokes, I posted the background approach instead...