Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

keypad

 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a keypad using a JTextfield, 12 JButtons, and a JDialog window. Is there a way to set a Listener on the JTextField that won't allow any more than four characters to be typed in it?
Thanks,
-Jason
 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, I meant to post this in the JFC forum. Would a nice sheriff please move it there? Sorry for this.
-Jason
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic