/* 浮動小数点のテスト Ver 0.00 */ /* */ /* */ /* by Atsushi 2000/7/24 */ import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class FloatTest extends MIDlet implements CommandListener { /* --- Field --- */ private Display display; private Command exit; /* --- Constructor --- */ public FloatTest() { display=Display.getDisplay(this); exit=new Command("Exit",Command.SCREEN,2); } /* --- 開始・終了 --- */ public void startApp() { Form form; float dummy; form=new Form("Forms"); form.appendString("Float:"+1.0); form.addCommand(exit); form.setListener(this); display.setCurrent(form); dummy=1.0f; } public void pauseApp() { } public void destroyApp(boolean unconditional) { } /* --- イベント --- */ public void commandAction(Command c,Displayable s) { if (c==exit) { destroyApp(false); notifyDestroyed(); } } }