非常急!在线等!一条Java语句的解释。

[复制链接]
查看11 | 回复0 | 2009-1-30 06:28:38 | 显示全部楼层 |阅读模式
jTextField1.setNextFocusableComponent(jPasswordField1);请问这句是什么意思?就问这一句以下是这个程序的一部分:……class Login extends JFrame implements KeyListener,ActionListener,MouseMotionListener{        FlowLayout flowLayout1=new FlowLayout();        JLabel jLabel1=new JLabel("用户代码:");        JTextField jTextField1=new JTextField(5);                JButton jButton1=new JButton("确认");                JLabel jLabel2=new JLabel("口令:");        JPasswordField jPasswordField1=new JPasswordField(8);        JButton jButton2=new JButton("退出");        Login(){                super("登录系统");                setSize(200,150);                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);                this.getContentPane().setLayout(flowLayout1);                Font font1=new Font("仿宋_GB2312", Font.ITALIC, 15);                jTextField1.setNextFocusableComponent(jPasswordField1);                jLabel1.setFont(font1);                jLabel2.setFont(font1);……

                                                                                                  jTextField1.setNextFocusableComponent(jPasswordField1);就是强制规定按下 Tab 后光标的顺序(也叫TabIndex)这表示,你在 jTextField1 中按下 Tab 键,光标会跳到 jPasswordField1 中.                                       
提问者对答案的评价:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行