under construction ...
Font font = new Font( "Monospaced", Font.PLAIN, 12 ); Graphics g; g.setFont( font ); FontMetrics fm = getFontMetrics( font ); int charWidth = fm.charWidth('W'); int charHeight = fm.getHeight(); String s = "whatever"; int stringWidth = fm.stringWidth( s );