Enable Custom FocusTraversalPolicy In Swing
Join the DZone community and get the full member experience.Join For Free
Every container in Swing/AWT can be given a FocusTraversalPolicy with:
public void setFocusTraversalPolicy(FocusTraversalPolicy policy)Remember to enable the container as a FocusCycleRoot:
setFocusCycleRoot(true)Together it looks like:
Opinions expressed by DZone contributors are their own.