View Single Post
  #1 (permalink)  
Old 03-23-2008, 04:24 AM
Clarkey Clarkey is offline
Member
 
Join Date: Mar 2008
Posts: 2
Clarkey is on a distinguished road
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
Reply With Quote
Sponsored Links