• Post Reply Bookmark Topic Watch Topic
  • New Topic

JComboBox and limitations  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how I can limit the number of characters keyed into an editable JComboBox?
I am using jdk 1.4
Thanks for any help!
[ April 23, 2002: Message edited by: Jennifer Sohl ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
About the only way I know how to do this is to register the component as a KeyEvent originator (using KeyListener or KeyAdapter). Perhaps a quick search on this forum for "limit characters" or "limit text" would locate a different solution.
Are you after tips on how to implement KeyListener?
Good Luck.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!