Width of String

Hi All,I need to use graphics to draw String. How can I know the physical width of a string(not the length of a string)?It is highly appreciated that anyone can answer me. Thanks!
[207 byte] By [delanox] at [2007-9-26 19:29:25]
# 1
String s = "What is the width of this string";FontMetrics fm = getFontMetrics(g.getFont()); int w = fm.stringWidth(s);Noah
noah.w at 2007-7-3 12:03:19 > top of Java-index,Archived Forums,Java Programming...