If you have a two-tiered or greater nested TabFolder,
for example:
----------------------
//... startup code ...
//Setup top tier
TabFolder tfTop = new TabFolder();
TabSheet tsTop1 = new TabSheet("Top-Tier #1");
TabSheet tsTop2 = new TabSheet("Top-Tier #2");
tfTop.getChildren().add(tsTop1);
tfTop.getChildren().add(tsTop2);
//Setup second tier
TabFolder tfSecond = new TabFolder();
TabSheet tsSecond1 = new TabSheet("Second-Tier #1");
TabSheet tsSecond2 = new TabSheet("Second-Tier #2");
tfSecond.getChildren().add(tsSecond1);
tfSecond.getChildren().add(tsSecond1);
//Add second tier to the second tab of the top tier
tsTop2.getChildren().add(tfSecond);
//... add TabFolder to frame and size both tiers ...
----------------------
Given that the top-tier TabFolder has been added to the
Application Frame, both the top tier and second tier
are visible, and the first tab of the top-tier is
selected, you will receive a "Can't move focus to the
control..." error if you try and execute the following
statement:
tfSecond.setCurrentIndex(1);
The problem is that the content area of the second tab
of the top tier is actually not visible. The second
'tab' is visible, but the content is not. Therefore,
when you change the currentIndex of the second tier
TabFolder, you trigger a TabSheet focus change, which
results in the above mentioned error.