Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Text Field validation for time format

962397Jun 19 2013 — edited Jun 20 2013

hi All,

I have been breaking my head for nearly 2 weeks but am not able to figure it out.. plz help me to resolve the riddle.. here it goes :

In a text field i want to perform a operation in the following way:

> a default text 00:00:00 is set for time as the text field is for time and the character length of the field is 8.

> if the cursor is in position 0(zero) and if i press a number key it should replace the position 0 value and move the cursor to next position.

eg : 00:00:00

        20:00:00

explanation : now the cursor is in position 0 and i press the key 2 it should replace the value 0 in position 0 and den move the cursor to position 1 ie. to next position..

when i press any non-numeric key it should not replace any of the value but the cursor should move to next position.

This post has been answered by James_D on Jun 19 2013
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 18 2013
Added on Jun 19 2013
9 comments
3,639 views