且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

选项卡上的java actionlistener

更新时间:2023-12-04 15:59:52

做到这一点的唯一方法是添加一个 javax.swing.event.ChangeListener 到JTabbedPane本身。您可能需要跟踪所选标签与之前选择的标签,具体取决于您对状态更改的处理方式...

The only way to do that is to add a javax.swing.event.ChangeListener to the JTabbedPane itself. You might have to keep track of the selected tab vs. previously selected tab depending on what you are doing with the state change...