Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2008, 07:44 PM
Member
 
Join Date: Jun 2008
Posts: 1
kataya is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-26-2008, 08:25 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
See Implementing a Document Filter on Text Component Features which has an example.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT +3. The time now is 02:48 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org