Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Forms not being shown when followed by a method call  RSS feed

Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm writing a J2ME library. As part of it's inner workings, it sends and SMS and then connects via HTTP to a server.
My problem is that due to space considerations (and complexity during testing) I don't want to create a separate thread for the HTTP connection, however, I DO want to let the user know that something is happening.
logic goes something like this
Send SMS
Display a "Please Wait" Form.
connect via HTTP and get some data.
code is:
sent = sendSMS();
ResponseMessage response =
}catch(IOException e){
If I comment out the get data section, the wait Form is displayed. If I don't, the MIDlet makes an HTTP connection and carries on without showing the wait Form.
I know that I should be creating a separate thread for the connection but as stated above, don't want to at this stage for a couple of reasons.
Anybody got any idea why my Form is not being shown ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!