Java MEで電卓を作っています。出力を表示するのに苦労しています。
これが私のコードです:
public void menuadd(){
vswitch=2;
Form formadd = new Form("addition");
add1 = new TextField("1st Number:", "", 30, TextField.DECIMAL);
add2 = new TextField("2nd Number:", "", 30, TextField.DECIMAL);
disp = Display.getDisplay(this);
cmdok = new Command("OK", Command.OK, 2);
formadd.addCommand(cmdok);
formadd.append(add1);
formadd.append(add2);
formadd.setCommandListener(this);
disp.setCurrent(formadd);
}