jme3 - updating guiNode from different thread/class

Hello everyone,



today i tried to implement a TUIO Client into a simpleApplication, for that i wrote a new class and added some custom tuio client to it. The class now recieves tuio events and stores them into a hashmap.



Now i want to visualize these incomming touches on the guiNode.



But wether i try to get the hashmap from the class and iterate over it, i get concurrency error, with a concurrent hashmap it is horribly slow when having a lot of touch events.



The next idea was calling the mainapp from the tuioclass adding objects to the guiNode directly from the main app, but that ended in having a renderer error, that something was called after updateState function (cant remember exactly and dont have the error saved).



So does anyone have an idea how i can visualize these incoming touches into the mainapp guiNode?



Im not quite sure for what to search, so im kinda stuck :slight_smile:



Thanks for any help


  • Hauke

thanks for the hint, i will have a deeper look into it :slight_smile: (never worked with swing :wink: )

Its just like swing threading, instead of SwingUtilities.invokeLater() you use app.enqueue().