Java/Swing: the fast/slow UI binding problem
        Posted  
        
            by Jason S
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jason S
        
        
        
        Published on 2010-03-30T19:31:24Z
        Indexed on 
            2010/03/30
            19:33 UTC
        
        
        Read the original article
        Hit count: 404
        
I need a way to bind UI indicators to rapidly-changing values.
I have a class NumberCruncher which does a bunch of heavy processing in a critical non-UI thread, thousands of iterations of a loop per second, and some number of those result in changes to a set of parameters I care about. (think of them as a key-value store)
I want to display those at a slower rate in the UI thread; 10-20Hz would be fine. How can I add MVC-style notification so that my NumberCruncher code doesn't need to know about the UI code/binding?
© Stack Overflow or respective owner