size of a string in pixel ?
- From: philippe.barthelemy@xxxxxxxxx
- Date: 26 Nov 2005 03:26:22 -0800
Hi,
In my graphic layout, i'd like to set the dimensions of the
string-based components.
the thing is that in order to preserve the layout, I'd like to set the
component's size to its maximum
( eg. if the JtextField contains a Date, i'll set it to the size
necessary to hold "wednesday, december 25th" )
in order to compute this size, I need to translate number of characters
to pixels. ( taking into account the fonts )
How can I do this ?
--Philippe
.
- Follow-Ups:
- Re: size of a string in pixel ?
- From: Roedy Green
- Re: size of a string in pixel ?
- From: Christian Kaufhold
- Re: size of a string in pixel ?
- From: Andrey Kuznetsov
- Re: size of a string in pixel ?
- Prev by Date: Re: resize windows with JFrame
- Next by Date: Re: size of a string in pixel ?
- Previous by thread: Close a window
- Next by thread: Re: size of a string in pixel ?
- Index(es):