Dimension (Object component, int dx, int dy, String defaultalignment) { String text = getString(component, "text", null); int tw = 0; int th = 0; if (text != null) { <error descr="Cannot resolve symbol 'FontMetrics'">FontMetrics</error> fm = getFontMetrics(getFont()); tw = fm.<error descr="Cannot resolve method 'stringWidth(java.lang.String)'">stringWidth</error>(text); th = fm.<error descr="Cannot resolve method 'getAscent()'">getAscent</error>() + fm.<error descr="Cannot resolve method 'getDescent()'">getDescent</error>(); } <error descr="Cannot resolve symbol 'Image'">Image</error> icon = getIcon(component, "icon", null); int iw = 0; int ih = 0; if (icon != null) { iw = icon.<error descr="Cannot resolve method 'getWidth(Thinlet)'">getWidth</error>(this); ih = icon.<error descr="Cannot resolve method 'getHeight(Thinlet)'">getHeight</error>(this); } return new Dimension(tw + iw + dx, Math.max(th, ih) + dy); }