Click to See Complete Forum and Search --> : Positioning the cursor


krisSomu
July 22nd, 1999, 05:44 PM
Hi,
I have a change_validated Textfield. Validation is done using insertString() method of a class that extends PlainDocument and this is set to the textfield. If the user enters a wrong entry, there will be a beep and I want the cursor to remain in the wrong entry and not to the next position. Can the cursor be positoned within the component using the setcursor() methods or should I override the contains(int,int) method of component to track my previous position. Is there any simple way to do this.

Any help is appreciated.

-Krish.