Swing buttons don't react immediately! How can I change that?

I've built a form with Netbeans's visual editor. When I press one of the buttons it should do the following : - set it to disabled - perform a task that takes some time - when the task finishes the button will be enabled again However, the following happens: - the button remains in a pressed state until the task finishes - when the task finishes, the enabling/disabling of buttons will be very fast (they will happen, but you won't notice them) This behaviour is not something I want. I tried using repaint on the JButton, on the JFrame and even on the JPanel containing the button, but I can't seem to get it to do what I want. Some hints?

以上就是Swing buttons don't react immediately! How can I change that?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏