/**
* Sets the selected tab. The tab is identified by the tab content
- * component.
+ * component. Does nothing if the tabsheet doesn't contain the component.
*
* @param c
*/
}
}
+ /**
+ * Sets the selected tab. The tab is identified by the corresponding
+ * {@link Tab Tab} instance. Does nothing if the tabsheet doesn't contain
+ * the given tab.
+ *
+ * @param tab
+ */
+ public void setSelectedTab(Tab tab) {
+ setSelectedTab(tab.getComponent());
+ }
+
+ /**
+ * Sets the selected tab, identified by its position. Does nothing if
+ * <code>index < 0 || index > {@link #getComponentCount()}</code>.
+ *
+ * @param index
+ */
+ public void setSelectedTab(int index) {
+ setSelectedTab(getTab(index));
+ }
+
/**
* Checks if the current selection is valid, and updates the selection if
* the previously selected component is not visible and enabled. The first