Re: [問題] JTextField輸入格式問題

看板java作者 (骨頭)時間19年前 (2006/05/27 12:36), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《bjack0927 (Bjack)》之銘言: : 請問一下因為我的JAVA要連接MYSQL : 因為在jTextField裡面我想設定它的輸入格式, : 讓使用者在輸入的時候,自動的按照xxxx-xx-xx(西元-月-日) : 這樣的格式輸入可以嗎? 自己在actionPerformed的時候, 寫個if測試就好啦 if(xxx.matches("[0-9]{4}-[0-9]{2}-[0-9]{2}")){ 正常pass }else{ 忽略,不執行後續動作. } -- String temp="relax"; | Life just like programing while(buringlife) String.forgot(temp); | to be right or wrong while(sleeping) brain.setMemoryOut(); | need not to say stack.push(life.running); | the complier will stack.push(scouting.buck()); | answer your life stack.push(bowling.pratice()); | Bone everything -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.138.240.58
文章代碼(AID): #14TzTBE0 (java)
討論串 (同標題文章)
文章代碼(AID): #14TzTBE0 (java)