开发者

Delaying the state change of JCheckbox

开发者 https://www.devze.com 2023-04-01 05:42 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号