e829. 获得和设置JTabbedPane 的卡片

 // To create a tabbed pane, see e828 创建JTabbedPane
    
    // Get the index of the currently selected tab
    int selIndex = pane.getSelectedIndex();
    
    // Select the last tab
    selIndex = pane.getTabCount()-1;
    pane.setSelectedIndex(selIndex);

 

Related Examples
posted @ 2018-09-06 09:16  borter  阅读(84)  评论(0编辑  收藏  举报