Lets say i have 2 midlet class called MainDisplay and
CommunicationHandler. In the MainDisplay, has a login form for users
to login. In order for users to login, it needs to connect to the
HTTP server through CommunicationHandler.login().
How do i move from MainDisplay to another thread called
CommunicationHandler?
Please help me out. I have tried this for the last two days. And
unsuccessful to call another thread.
Here are the part of the code in MainDisplay:
if (command.getCommandType() == Command.OK) {
Thread comthread = new Thread(communicationhandler) {
public void run() {
String user = null;
String pass = null;
user = username.getString();
pass = password.getString();
communicationhandler.login(user, pass);
comthread.start();
}
comthread.stop();