/*
* Cast to a TabSheet. This isn't really necessary in this example, as
* we have only one TabSheet component, but would be useful if there
* were multiple TabSheets.
*/
TabSheet source = (TabSheet) event.getSource();
if (source == tabsheet) {
/* If the first tab was selected. */
if (source.getSelectedTab() == tab1_root) {
System.out.println("foo");
tab2_root.setEnabled(false);
tab3_root.setEnabled(false);
}
}