import javax.microedition.lcdui.*; public class Menu extends Canvas { private Graphics g; private int w, h; private Font font; /** * constructor */ public Menu() { repaint(); w=getWidth(); h=getHeight(); } /** * paint */ public void paint(Graphics g) { this.g=g; } /** * Called when a key is pressed. */ protected void keyPressed(int keyCode) { } public void loading(Image logo, int delay){ g.setColor(0,0,0); g.fillRect(0,0,w,h); g.drawImage(logo,w/2-logo.getWidth()/2,h/2-logo.getHeight()/2, Graphics.LEFT|Graphics.TOP); try { Thread.sleep(delay); } catch (Exception exc) { } } }