private void exitMIDlet()
{
try
{
destroyApp(false);
notifyDestroyed();
} catch (MIDletStateChangeException e)
{
e.printStackTrace();
}
}
protected void pauseApp()
{
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
}
public void commandAction(Command arg0, Displayable arg1)
{
if(arg0 == connectCommand)
{
String name = userName.getString();
String mail = email.getString();
int myAge = Integer.parseInt(age.getString());
int i = gender.getSelectedIndex();
boolean myGender = i==0?true:false;
Account account = new Account(name,mail,myAge,myGender);
nt.setAccount(account);
// System.out.println(account.toString());
synchronized(this)
{
notify();
}
}
else if(arg0 == exitCommand)
{
exitMIDlet();
}
}
class NetworkThread extends Thread
{
private NetworkMIDlet midlet;
private boolean going = true;
private Account account = null;
public NetworkThread(NetworkMIDlet midlet)
{
this.midlet = midlet;
}
public synchronized void setAccount(Account account)
{
this.account = account;
}