JTabbedPane 切换tab页
this.tabbedpane.setSelectedIndex(index);
------------------------------------
Sets the selected index for this tabbedpane. The index must be a valid tab index or -1, which indicates that no tab should be selected (can also be used when there are no tabs in the tabbedpane). If a -1 value is specified when the tabbedpane contains one or more tabs, then the results will be implementation defined.
- Parameters:
- index the index to be selected
- Throws:
- IndexOutOfBoundsException - if index is out of range (index < -1 || index >= tab count)
- See Also:
- getSelectedIndex
- SingleSelectionModel.setSelectedIndex
- @beaninfo
- preferred: true description: The tabbedpane's selected tab index.
博客地址: https://www.cnblogs.com/java2sap/
世界丰富多彩,知识天花乱坠。
---如果有帮到你,点个赞吧~
世界丰富多彩,知识天花乱坠。
---如果有帮到你,点个赞吧~