我有一个窗格,我需要重建内容,然后将其与当前面板交换,但前提是它是当前选项卡。
You can simply do this:
final int nTabIndex = myTabbedPane.indexOfTabComponent( myPanel );
final boolean bIsVisible = myTabbedPane.isEnabledAt( nTabIndex );
if ( bIsVisible ) {
// Do stuff with myPanel
myPanel.repaint();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.