K
Katie
Hi,
I am trying to write a truncate method which will be able to
concatenate a String based on pixel width of the string rather than
the number of characters. I was trying to use the Fontmetrics object
but unfortunately its abstract and get be used with the Graphics
(abstract) object which i don't have.
Is there any way to accomplish this without using the Graphics object,
to use the Font class to set the font styles and then passing the
string and getting its width based on the Font and styles ?
Thanks for your help

I am trying to write a truncate method which will be able to
concatenate a String based on pixel width of the string rather than
the number of characters. I was trying to use the Fontmetrics object
but unfortunately its abstract and get be used with the Graphics
(abstract) object which i don't have.
Is there any way to accomplish this without using the Graphics object,
to use the Font class to set the font styles and then passing the
string and getting its width based on the Font and styles ?
Thanks for your help