I want to know how to adjust the Tab order in a Swing interface. I found an example and it showed this method should do the trick but it seems that it's deprecated and not working.
getCombox("cmbFrom").setNextFocusableComponent(getCombox("cmbTo"));
Note :- Below method returns a Combox object with the Argument name. If someone knows how to do it with Netbeans IDE it would be great. I found a way to do it in Eclipse WindowBuilder but not in Netbeans IDE. Thank you.
getCombox(String s)
解决方案
You can use the setFocusTraversalPolicy in your container.
FocusTraversalPolicy class is abstract and you need implement few methods which will return the container's component focus order. It will work with Tab and Shift + Tab.