特定の数の文字が入力されたときに関数を実行するために使用できるリスナーは何JTextFieldですか?
JTextField txtF=new JTextField();
char[] txtIn=txtF.getText().toCharArray();
if(txtIn.length()==5){
//perform action here
}
試しkeyPressedてみましたが、文字の長さを確認するためにEnterキーを押す必要があります。
特定の数の文字が入力されたときに関数を実行するために使用できるリスナーは何JTextFieldですか?
JTextField txtF=new JTextField();
char[] txtIn=txtF.getText().toCharArray();
if(txtIn.length()==5){
//perform action here
}
試しkeyPressedてみましたが、文字の長さを確認するためにEnterキーを押す必要があります。