Results 1 to 5 of 5
Thread: help with JTextfield
- 07-11-2007, 10:05 AM #1
Member
- Join Date
- Jun 2007
- Posts
- 8
- Rep Power
- 0
- 07-11-2007, 11:30 AM #2
Hmm, in the way you want it to be implemented, this is a little bit complex problem. Because you can't know when the user finished his job with a textfied!! You can just guess it!
How you can guess it? You can listen textfield for a specified time period which is acceptable by your users. For example once user starts typing, you can count number of milliseconds passed from the last character entered! When this passes a certain threshold, you can decide that the user finished his job with that textfield and transfer the focus to the other one. And you will need to implement this in a separate thread!
In my opinion, if your application is not targeting to a very specific data entry job, this is not the correct way to implement entering data. Because today or tomorrow, your users will not be satisfied with the threshold selected above. You can control focus with tab key (focus transferred when user press tab key) or you can think about a more innovative way of getting the data (e.g. via an input file).
- 07-11-2007, 11:47 AM #3
Member
- Join Date
- Jun 2007
- Posts
- 8
- Rep Power
- 0
my application is targeted to a specif type of data entry and each textfield will always have the same ammount of characters inputed.
- 07-11-2007, 01:41 PM #4
Then it is easier. Check the number of characters and activity of textfields with a thread and change focus when user enters required number of characters.my application is targeted to a specif type of data entry and each textfield will always have the same ammount of characters inputed.
- 07-11-2007, 01:58 PM #5
Member
- Join Date
- Jun 2007
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
how to focus to another JTextfield?
By birdofprey in forum AWT / SwingReplies: 2Last Post: 04-09-2008, 01:08 PM -
Using Columns With JTextField
By The Evil Genius in forum AWT / SwingReplies: 1Last Post: 03-17-2008, 01:01 AM -
Can't edit JTextField after modal dialog
By JavaNerd in forum Java AppletsReplies: 0Last Post: 02-07-2008, 09:11 PM -
Clean the content of the JTextField
By elizabeth in forum AWT / SwingReplies: 1Last Post: 07-26-2007, 08:38 PM -
How to determine if the value of a JTextField is double
By nemo in forum New To JavaReplies: 1Last Post: 05-20-2007, 11:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks