Results 1 to 3 of 3
  1. #1
    wired-in=p is offline Member
    Join Date
    Jul 2011
    Posts
    38
    Rep Power
    0

    Default Restricting size to a jtextbox

    In a program Im making i need to restrict the maximum characters that can be added to a Jtextfield. How can i accomplish this?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Restricting size to a jtextbox

    Look to adding a DocumentFilter to the JTextField's Document. Check out the API, and then search this forum as I know that I have posted an example or two of this.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Restricting size to a jtextbox

    Moved from New to Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. how to save a pdf file as named in a Jtextbox.
    By seredi in forum New To Java
    Replies: 6
    Last Post: 09-20-2011, 03:27 PM
  2. Complex GUI 60 JComboBox + 40+ JTextBox
    By Paul_White in forum New To Java
    Replies: 8
    Last Post: 05-12-2011, 07:51 PM
  3. sdk development: restricting access from outside
    By madhusudhan y in forum Advanced Java
    Replies: 1
    Last Post: 03-01-2011, 04:20 PM
  4. Jtextbox with dropdown list
    By vijay_s in forum AWT / Swing
    Replies: 1
    Last Post: 05-08-2008, 10:17 PM
  5. Jtextbox with dropdown list
    By vijay_s in forum AWT / Swing
    Replies: 3
    Last Post: 05-08-2008, 06:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •