oracle.com java tutorial states that
Quote
To Switch to Specific Tabs
There are three ways to switch to specific tabs using GUI.
1. Using a mouse. To switch to a specific tab, the user clicks it with the mouse.
2. Using keyboard arrows. When the JTabbedPane object has the focus, the keyboard arrows can be used to switch from tab to tab.
3. bla bla bla
There are three ways to switch to specific tabs using GUI.
1. Using a mouse. To switch to a specific tab, the user clicks it with the mouse.
2. Using keyboard arrows. When the JTabbedPane object has the focus, the keyboard arrows can be used to switch from tab to tab.
3. bla bla bla
my workaround to that was
panelForTabs.registerKeyboardAction(null, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), 0); panelForTabs.registerKeyboardAction(null, KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), 0);it works, but java informs me that registerKeyboardAction is now obsolete and i should use a combination of getActionMap and getInputMap for some reason
i'm pretty sure that there's an official way to get rid of the arrow behaviour, maybe someone knows better


Sign In
Create Account


Back to top









