import javax.microedition.lcdui.*; public class Test3DCanvas extends Canvas implements Runnable { public Test3DMidlet midlet; private Thread thread = null; public Test3DCanvas(Test3DMidlet midlet) { this.midlet = midlet; setFullScreenMode(true); thread = new Thread(this); thread.start(); } public void paint(Graphics g) { try { g.setColor(0); g.setClip(0, 0, getWidth(), getHeight()); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(255, 255, 255); g.drawString("Test...", 50, 50, 0); }catch(Exception e){ e.printStackTrace(); } } public void run() { while (true) { repaint(); try { Thread.sleep(50); } catch (Exception e) { } } } }