You could also try changing uhm setFocusTraversalPolicy of the toolbar.
Interesting. Within LateralGm, in the main method i've added the following code after the creation of the JFrame (line 843) :
final Container contentPane = LGM.frame.getContentPane();
Comparator<Component> comp = new Comparator<Component>() {
public int compare(Component c1, Component c2) {
Component comps[] = contentPane.getComponents();
List<Component> list = Arrays.asList(comps);
int first = list.indexOf(c1);
int second = list.indexOf(c2);
return second - first;
}
};
FocusTraversalPolicy policy = new SortingFocusTraversalPolicy(comp);
frame.setFocusTraversalPolicy(policy);
I've found the code here :
http://www.java2s.com/Code/JavaAPI/java.awt/ContainersetFocusTraversalPolicyFocusTraversalPolicypolicy.htmI don't have anymore the error, and the focus traversal policy seems to work. However on the toolbar it doesn't seem to work anymore, but from my points of view it's not important. But is it the best way to fix this error ? I don't know. (At least the useLegacyMergeSort was only one line of code).