problem of set focus on the cell during the validation.

I am having a table with 5 columns.

I can change the value of the 2nd cell in 2 ways.

one by 1. editing the 2nd cell

or by 2. clicking the button avilable in the 1st cell.(the button editor will set the value to the 2nd cell of selected row)

In both cases, i have to validate the value in the 2nd cell.

If the value is not meeting some criteria, i am pop uping a msg box, contain approprite message.

and the cursor should be focused on the 2nd cell until the value will be corrected.

i done for the case 1.

but for the case 2, i couldn't keep the cursor on the 2nd cell when the value got changed by the button editor of cell 1, and if the value is wrong

The 1st cell 2nd cell are having it own Renderer and Editor

even i tried a lot, but i not yet achieved it.

pls. guide me to get a perfect result.

[889 byte] By [nirgun_xyza] at [2007-11-27 7:38:44]
# 1
have you read this tutorial? http://java.sun.com/docs/books/tutorial/uiswing/components/table.htmlit may help you
suparenoa at 2007-7-12 19:19:19 > top of Java-index,Desktop,Core GUI APIs...
# 2

Thnks for u'r reply.

the 1st part what i mentioned is done by the same way in those example by the sun site only.

But in the 2nd part, when i set the value to text field by the button editor,

the editor of the textField(2nd cell), is not got called.

If i made to call editor also, i am unable to keep the cursor on 2nd cell

nirgun_xyza at 2007-7-12 19:19:20 > top of Java-index,Desktop,Core GUI APIs...