I have a Label
in a Scene
. I need to get always the largest font size for the text in it, so that the text always takes the maximum size in the available size of the label.
How can I do that?
final double MAX_FONT_SIZE = 30.0; // define max font size you need
label.setFont(new Font(MAX_FONT_SIZE)); // set to Label
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With