akhanh Posted November 15, 2007 Share Posted November 15, 2007 Hi all,how can i get the pixel size of a Stringvalue? Thanks allHA Link to comment Share on other sites More sharing options...
StackTrayce Posted November 16, 2007 Share Posted November 16, 2007 You can use the java.awt.FontMetrics class and its methods. You create a FontMetrics instance by passing in a Font object and then you can use it to do calls like myFontMetrics.stringWidth("Some string"); Hope this helps, I think this is what you were asking but I am not totally sure. Link to comment Share on other sites More sharing options...
akhanh Posted November 16, 2007 Author Share Posted November 16, 2007 Hi StackTrayce, your way is possible, but i will avoid to use awt classes. I will try to use only jasper reports api functionality, but i didnt found any class/method. Can anybody help? ThanksHA Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now