[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I add GUI to ping of ants 2.0
> I am studying ants 2.0 now.
> I want to add GUI to ping for test.
> In recent archive, I known that I have to use Node.threadStart.
> But I still don't know what to do concretely.
> How can I escape from " Error current thread is not a
> pj_Thread.ThreadWrapper!" ??
The java nodeos doesn't like regular java.lang.Threads executing its
functions, however, awt creates event handler threads through the
java.lang.Thread interface. So a simple solution is just to create an
worker thread with Node.threadStart which will execute java nodeos
functions on behalf of the awt event handler thread. So, basically, if
you need to send a capsule or something similar in the handler for a GUI
event, you just send a message to the thread started with Node.threadStart
and it sends the capsule. Its a little convoluted, but it should work.
tim stack
[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah