How to use Wait Screen and Thread?

Greetings,

I was wondering If I could ask a question...

Here it goes:

How can I use aWait Screen in a MIDlet so that I can do the Following:

1.- Create and Open anHttp Connection[/b](using an Object which extends Thread) in a Form by pressing an OKCommand.

2 .- Show theWait Screen Until the Thread Object finishes execution(finishes whatever is inside run() method)

3.- Finally show the Result(s) of the Connection(bytes obtained from URL) inanother Form.

--

First of all, Is what I ask even possible? and more importantly...

Can aWait Screen actually Detect when a Thread finished execution? so that only when the thread finishes the program proceeds to the next statement?

Thank you very much in advance!

Sincerely, your friend,

Jose

[871 byte] By [BCE_Josea] at [2007-11-27 10:45:22]
# 1

WaitScreen is not a standard screen. It is available in netbeans.

in netbeans you can assigne a SimpleCancelabeTask to it.

and write your code in its execute method.

that will do what you want.

etaa at 2007-7-28 20:12:34 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Thank you very much Sir, I suppose that narrows it down a bit,

Because I definitely need my applications as standard as possible.

But good to know there's a way to do it.

Well, Thank you very much as usual!

Sincerely,

Keep up with the fantastic job you do every day!

God Bless.

J

BCE_Josea at 2007-7-28 20:12:34 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

No you got it wrong. it is not like any optional package or api.

it is a simple package with a few classes contained. even the source code is available. use them and don't worry.

Message was edited by:

eta

etaa at 2007-7-28 20:12:34 > top of Java-index,Java Mobility Forums,Java ME Technologies...