在键盘事件中用这的方法!
public String getText()
Returns the text contained in this TextComponent. If the underlying document is null, will give a NullPointerException.
Returns:
the text

解决方案 »

  1.   

    哦 应该是ActionListener 
      

  2.   

    使用TextField.getText()取得文本框中的值.
      

  3.   

    confirmBtn.addActionListener(new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent evt) {
             jBtnConfirmActionPerformed(evt);
           }
         }
        );
     public void jBtnConfirmActionPerformed(java.awt.event.ActionEvent evt){
         
       //then you add some programme here.
    }
      

  4.   

    点击按钮 用行动事件 ActionEvent 
      

  5.   

    哈哈 该做的都让judgement_sword(没什么) 做了!