From: Daniel S. <d.s...@gm...> - 2011-11-08 06:28:58
|
Hi, I've been experimenting a bit with the JmmDNS class, but not having much luck getting service and service type listeners to work. I then went back to the example program in com/strangeberry/jmdns/tools, ran it with the -browse option and it worked fine. I need to remove the need for the swing gui though, so I stripped back the program until all that was left was the JFrame inheritance and the call to super(), see attached. It will auto-detect service types and will also work trigger callbacks properly when a service listener is added. But removing the JFrame loses all the callback functionality. I'm form c++ land, so probably it's just my lack of java wisdom holding me back here - I'm guessing that its because everything gets set up in the EDT when using the JFrame that makes it ok. But I'm curious to know why (it falls apart when there's no edt) and what's the best way of dealing with this? Cheers, Daniel. |