J2ME中文教程 7 开发无线网络应用程序[49]

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

本文简介:

    private static Display display;

    private Form f;

    ChoiceGroup cg;

    private boolean isPaused;

    private Command exitCommand = new Command("Exit", Command.EXIT, 1);

    private Command startCommand = new Command("Start", Command.ITEM, 1);

    public DatagramMIDlet()

    {

        display = Display.getDisplay(this);

        f = new Form("Datagram Demo");

        cg = new ChoiceGroup("Please select peer", Choice.EXCLUSIVE, names,

                null);

        f.append(cg);

        f.addCommand(exitCommand);

        f.addCommand(startCommand);

        f.setCommandListener(this);

        display.setCurrent(f);

    }

    public static Display getDisplay()

    {

        return display;

    }

    public boolean isPaused()

    {

        return isPaused;

    }

    public void startApp()

    {

本文关键:J2ME中文教程 7 开发无线网络应用程序
 

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

go top