為什么無論在文本框里輸入什么 str都輸出是空白

uj5u.com熱心網友回復:
你讀取的時候,textfild還沒有輸入值。需要增加一個事件(比如按鈕按下),后讀取textfild 才能讀到輸入值uj5u.com熱心網友回復:
樓上正解,增加一個Jbutton,添加點擊監聽事件 button.addActionListener(new ActionListener())轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/84832.html
標籤:Java相關
上一篇:質數
下一篇:虛擬機HIDDevice.write()報java.io.IOException: 引數錯誤。真機運行又正常。求助
