changeset 11798 | fbab70de9b0d |
parent 6541 | d3ac35b2bfbf |
child 11872 | 4f24fd4dbcf5 |
--- a/lib/browser/GraphBrowser/Vertex.java Tue Oct 16 00:50:23 2001 +0200 +++ b/lib/browser/GraphBrowser/Vertex.java Tue Oct 16 16:47:54 2001 +0200 @@ -69,7 +69,8 @@ public void setID(String s) {} public Dimension getLabelSize(Graphics g) { - FontMetrics fm=g.getFontMetrics(font); + FontMetrics fm = g == null ? + new DefaultFontMetrics(font) : g.getFontMetrics(font); return new Dimension( Math.max(fm.stringWidth("[. . . .]"),fm.stringWidth(getLabel())),