JComponent.setextFocusableComponent(nameId);指定tab的下一个位置。

解决方案 »

  1.   

    JComponent.setextFocusableComponent(nameId);指定tab的下一个位置。
    这个方法不推荐使用了,有没有别的方法?
      

  2.   

    sean_gao(大胃):JDK1.4版引入了FocusTraversalPolicy类,可以参考一下:http://java.sun.com/j2se/1.4.2/docs/api/java/awt/FocusTraversalPolicy.html
      

  3.   

    看看java.awt.FocusTraversalPolicypublic void setNextFocusableComponent(Component aComponent)
    Deprecated. As of 1.4, replaced by FocusTraversalPolicy Overrides the default FocusTraversalPolicy for this JComponent's focus traversal cycle by unconditionally setting the specified Component as the next Component in the cycle, and this JComponent as the specified Component's previous Component in the cycle. Parameters:
    aComponent - the Component that should follow this JComponent in the focus traversal cycle
    See Also:
    getNextFocusableComponent(), FocusTraversalPolicy