how to stop cell edit in jtable?

Hello,how can I stop to edit JTable cells by any user.I want to stop table cell editing from GUI window.Also, I need to activate enter button without mouse clicking it. by activate enter key by simply enter keyboard enter key.how can I do it.thank you.
[294 byte] By [rameshsa] at [2007-11-27 6:08:16]
# 1
table.getCellEditor().stopCellEditing(); // stoping cell editingthis.getRootPane().setDefaultButton(m_btnLogin); // activate enter button (default button)hope it helpdaya
dayanandabva at 2007-7-12 17:10:24 > top of Java-index,Desktop,Core GUI APIs...
# 2

hello dayanand,

thank you.

but, I need to activate UserLoginButton by just using keyboard enter key.

in your example, m_btnLogin is the button we used in GUI or default one.

where can I put this line.

in my login button action performed or in the constructor.

actually, some one say to use ,

table.putClientProperty ("terminateEditOnFocusLost", Boolean.TRUE)

but where can i put it. I am using tableModel.

rameshsa at 2007-7-12 17:10:24 > top of Java-index,Desktop,Core GUI APIs...