Put focus on tabbed pane after selection change

This effects to the user not having to tab through the first GUI widgets (component name, preset etc.), but instead a single tab key press will cycle directly to the first widget of that tab.
This commit is contained in:
SiboVG 2022-08-28 14:56:31 +02:00
parent abeba2fa46
commit c217479a3c

View File

@ -140,6 +140,12 @@ public class RocketComponentConfig extends JPanel {
tabbedPane = new JTabbedPane();
this.add(tabbedPane, "newline, span, growx, growy 100, wrap");
order.add(tabbedPane);
tabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
tabbedPane.requestFocusInWindow();
}
});
//// Override and Mass and CG override options
tabbedPane.addTab(trans.get("RocketCompCfg.tab.Override"), null, overrideTab(),