携帯JAVAのスレッドat TECH
携帯JAVAのスレッド - 暇つぶし2ch349:345
03/02/02 22:50
>>348
import javax.microedition.midlet.* ;
import javax.microedition.lcdui.* ;
public final class test extends MIDlet implements CommandListener {
Form f1, f2 ;
public test () {
f1 = new Form("Form1") ;
f2 = new Form("Form2") ;
f1.addCommand( new Command( "Form2へ", Command.OK, 101)) ;
f2.addCommand( new Command( "Form1へ", Command.OK, 102)) ;
f1.append("これはForm1です。") ;
f2.append("これはForm2です。") ;
f1.setCommandListener( this) ;
f2.setCommandListener( this) ;
Display.getDisplay(this).setCurrent( f1);
return ;
}
public void commandAction(Command c, Displayable d){
if( d==f1){
Display.getDisplay(this).setCurrent( f2);
return ;
} else if( d==f2){
Display.getDisplay(this).setCurrent( f1);
return ;
} else {
System.out.println("えら~") ;
return ;
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch