|
Finding the exact length of a string in a JLabel (in pixels)
Hi,
I am making a program for my dads company, and am currently adding some effects to some of the things in it. One of them is calculating the exact length of a string so that I can alter the size of the JLabel to suit it (and so I can lengthen a JTextfield as it is typed in). I remember having this problem ages ago and I couldnt find a solution at all then.
Does anyone have a solution to this?
Thank you,
Clarkey
|