stringWidth : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

stringWidth
You can’t talk about the length of a string in pixels without specifying the font. To calculate the string’s
Font font = getFont();
FontMetrics metrics = getFontMetrics( font );
int width = metrics.stringWidth( theString );

This page is posted
on the web at:

http://mindprod.com/jgloss/stringwidth.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\stringwidth.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[54.163.159.27]
You are visitor number