I've got an JComboBox with a custom inputVerifyer set to limit MaxLength when it's set to editable.
The verify method never seems to get called.
The same verifyer gets invoked on a JTextField fine.
What might I be doing wrong?
I found a workaround. I thought I'd let the next person with this problem know about.
Basically. Instead of setting the inputVerifier on the ComboBox you set it to it's "Editor Component".
JComboBox combo = new JComboBox();
JTextField tf = (JTextField)(combo.getEditor().getEditorComponent());
tf.setInputVerifier(verifyer);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With