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

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

本文简介:

    Sender sender;

    public Client(DatagramMIDlet m)

    {

        parent = m;

        display = Display.getDisplay(parent);

        f = new Form("Datagram Client");

        si = new StringItem("Status:", " ");

        tf = new TextField("Send:", "", 30, TextField.ANY);

        f.append(si);

        f.append(tf);

        f.addCommand(sendCommand);

        f.setCommandListener(this);

        display.setCurrent(f);

    }

    public void start()

    {

        Thread t = new Thread(this);

        t.start();

    }

    public void run()

    {

        try

        {

            DatagramConnection dc = (DatagramConnection) Connector

                    .open("datagram://localhost:5555");

           

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

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

go top