Delaying the state change of JCheckbox
I'd like to make a Swing JCheckBox behave like this:
- When the user clicks it, a message is sent to the server, with the opposite of the checkbox' current checked state (!checked). That state doesn't actually change immediately.
- Some time later, the server responds with the new state for the checkbox.
I presume this is a pretty common usage pattern. What is the 开发者_如何学Pythoncorrect way to do this?
take a look at PropertyChangeSupport. This article may give you some hints on how to implement what you want.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论