Results 1 to 2 of 2
  1. #1
    kataya is offline Member
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Default Constraining Input in JTextField

    I am writing a program that has a bunch of little JTextFields fields (sudoku). Ideally each of these text fields will only accept one character. Using setColumns() or defining the number of columns in the constructor only limits the size of the display, not the amount of text accepted. Any ideas? Perhaps JTextField is not the correct component to use in this situation? Thanks in advance.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

Similar Threads

  1. JtextField
    By kashifu in forum Advanced Java
    Replies: 2
    Last Post: 06-27-2008, 04:25 PM
  2. how to focus to another JTextfield?
    By birdofprey in forum AWT / Swing
    Replies: 2
    Last Post: 04-09-2008, 01:08 PM
  3. Using Columns With JTextField
    By The Evil Genius in forum AWT / Swing
    Replies: 1
    Last Post: 03-17-2008, 01:01 AM
  4. how to take input and verify input in Java programs
    By bilal_ali_java in forum Advanced Java
    Replies: 0
    Last Post: 07-21-2007, 08:46 AM
  5. help with JTextfield
    By gary in forum New To Java
    Replies: 4
    Last Post: 07-11-2007, 01:58 PM

Posting Permissions

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