2011-06-22 58 views

回答

4

你可以簡單地這樣做:

final int nTabIndex = myTabbedPane.indexOfTabComponent(myPanel); 
final boolean bIsVisible = myTabbedPane.isEnabledAt(nTabIndex); 
if (bIsVisible) { 
    // Do stuff with myPanel 
    myPanel.repaint(); 
} 
相關問題