File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Other JSE/JEE APIs
How to get the size of a string in pixels?
Joined: Nov 20, 2000
Sep 25, 2002 00:44:00
Is there any way by which i can get the size
in pixels? I mean depending on the
font size and style,i get the length of the string
Author and all-around good cowpoke
Joined: Mar 22, 2000
Sep 25, 2002 20:38:00
Sounds like you are looking for the
class in the java.awt package. Thats the class which can tell you such things as the display size of a string in pixels and the other data you need to exactly position text.
Java Resources at
subject: How to get the size of a string in pixels?
getting problem in creating an image from int array
Convert JFrame to image
Crop an image in Java
planning to buy MacBook
Size of String in Pixels from JTextField
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014