Hi,
 
Want to dispatch a long running process from a JButton and while it is running:
* release the JButton from it's depressed state
* update my UI into a 'busy / wait' state
until the process finishes when I will return my UI into it's normal state.
 
But there's something basic that I am missing here, can anyone help?
 
Regards,
Gareth
 
 
Samples of my have attempts:
 
class SomePanel(swing.JPanel)
    def buildUI(self):
        self.add(swing.JButton('Update', actionPerformed=self.update))

    def update(self, event):
        import threading      
        self.safety(True) # disable the ui from further inputs
        t = threading.Thread(target=long_running_process)
        t.start()
        t.join()
        self.refresh()  # update with fresh info from the process       
        self.safety(False) # restore user inputs


and

    def update(self, event):
        self.safety(True) # disable the ui from further inputs
        long_running_process()
        self.refresh()  # update with fresh info from the process       
        self.safety(False) # restore user inputs