29.01.2014 Views

6-J2ME-NETWORKING-P1

6-J2ME-NETWORKING-P1

6-J2ME-NETWORKING-P1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MIDLET cont.<br />

public void startApp() {<br />

mDisplay = Display.getDisplay(this);<br />

mDisplay.setCurrent(mMainForm);<br />

}<br />

public void pauseApp() {}<br />

public void destroyApp(boolean unconditional) {}<br />

public void commandAction(Command c, Displayable s) {<br />

if (c == mExitCommand)<br />

notifyDestroyed();<br />

else if (c == mConnectCommand) {<br />

Form waitForm = new Form("Waiting...");<br />

mDisplay.setCurrent(waitForm);<br />

Thread t = new Thread() {<br />

public void run() {<br />

connect();<br />

}<br />

};<br />

t.start();<br />

}<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!