How to limit the Characters to be Enterred into the JTextField

How to limit the Characters to be Enterred into the JTextField

Page 1 of 1

1 Replies - 9024 Views - Last Post: 03 May 2009 - 11:33 AM Rate Topic: -----

#1 suresh.uvce  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 01-December 08

How to limit the Characters to be Enterred into the JTextField

Post icon  Posted 03 May 2009 - 09:36 AM

Hai I am using the JTextField where I want the characters into the TExtfield to be Entered to be Limited to 20Characters and further enter the Character it should not Enter the Charater into the Textfield.
Is This A Good Question/Topic? 0
  • +

Replies To: How to limit the Characters to be Enterred into the JTextField

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to limit the Characters to be Enterred into the JTextField

Posted 03 May 2009 - 11:33 AM

You'll have and actionListener to your JTextField add accept/refuse the key's enterered

http://java.sun.com/.../textfield.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1