import javax.microedition.lcdui.*; class Util { int w = Run.runI.width; int h = Run.runI.height; Font font; Util () { font = Font.getFont(0, 0, Font.SIZE_MEDIUM); } /*---+--- util methods;*/ int hcenter(String text) { return (w - font.stringWidth(text))/2; } int vcenter (int my) { return (my-font.getHeight())/2; } }