如何设置某个jframe上面的各个控件获得焦点的顺序?——也就是tab键顺序。

Could 2004-02-01 02:30:24
谢啦。
...全文
250 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
marvy 2004-05-08
  • 打赏
  • 举报
回复
支持Acylas(Acylas)!
Acylas 2004-05-08
  • 打赏
  • 举报
回复
看看java.awt.FocusTraversalPolicy

public 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
maowu 2004-05-08
  • 打赏
  • 举报
回复
sean_gao(大胃):

JDK1.4版引入了FocusTraversalPolicy类,可以参考一下:

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/FocusTraversalPolicy.html
hiswing 2004-05-08
  • 打赏
  • 举报
回复
JComponent.setextFocusableComponent(nameId);指定tab的下一个位置。
这个方法不推荐使用了,有没有别的方法?
panpan221 2004-05-08
  • 打赏
  • 举报
回复
新手学习,关注
ye255 2004-02-03
  • 打赏
  • 举报
回复
JComponent.setextFocusableComponent(nameId);指定tab的下一个位置。
cf981231_sohu 2004-02-03
  • 打赏
  • 举报
回复
关注
freshman113 2004-02-02
  • 打赏
  • 举报
回复
在JB中找不到设置。关注。
Could 2004-02-02
  • 打赏
  • 举报
回复
这个不行吧
tiger_wkh52741 2004-02-01
  • 打赏
  • 举报
回复
JFrame.requestFouce()

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧