J2ME中文教程 3 MIDP高级UI 的使用[40]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

 

                Command start = new Command("开始",Command.OK,1) ;

                Command stop = new Command("停止",Command.STOP,1) ;

                al.addCommand(start);

                al.addCommand(stop);

                al.setCommandListener(this);

                display.setCurrent(al);

        }

        public void commandAction(Command c,Displayable s)

        {

                String cmd = c.getLabel() ;

                if(cmd.equals("开始"))

                {

                        for(int i=0 ; i <11 ; i++)

                        {

                                g.setValue(i);

                                try

                                {

                                        Thread.sleep(500);

                                }catch(Exception e){}

本文关键:J2ME中文教程 3 MIDP高级UI 的使用
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top