import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class TriangleSerpinskogo extends MIDlet { Display d; Triangle t; public void startApp() { if (d==null) { d=Display.getDisplay(this); } if (t==null) { t=new Triangle(); } d.setCurrent(t); t.start(); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } }