更新时间: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...