The moose likes Swing / AWT / SWT and the fly likes keypad Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "keypad" Watch "keypad" New topic
Author

keypad

Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
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 R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
Oops, I meant to post this in the JFC forum. Would a nice sheriff please move it there? Sorry for this.
-Jason
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: keypad