import javax.microedition.lcdui.*; import java.io.*; class Splash extends Canvas implements Runnable { private GameMidlet midlet = null; private Image imageSplash = null; Splash(GameMidlet midlet) { this.midlet = midlet; try { imageSplash = Image.createImage("/res/Splash.png"); } catch(Exception ex) { System.err.println("Splash.png not found"); } setFullScreenMode(true); new Thread(this).start(); } public void run() { synchronized(this) { try { wait(2000L); } catch (InterruptedException e) {} try { midlet.initializationGame(); } catch (Exception ex) { System.err.println("not found method initializationGame()"); } } public void paint (Graphics graphics) { graphics.fillRect(0, 0, getWidth(), getHeight()); graphics.setColor(ffffff); graphics.drawImage(imageSplash, getWidth()/2, getHeight()/2, Graphics.VCENTER|Graphics.HCENTER); } }