This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes editing a cell in a uneditable model of JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "editing a cell in a uneditable model of JTable" Watch "editing a cell in a uneditable model of JTable" New topic
Author

editing a cell in a uneditable model of JTable

lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
hi guys,
i have a JTable which is uneditable that is,i had overriden the isCellEditable method.but the question is ,if i press a button i should be able to insert a new row in that table.
is it possible.

thanks in advance
lavanya
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Yes but you won't be able to change the values.
Jeff Wisard
Ranch Hand

Joined: Jan 07, 2002
Posts: 89
Actually, you can change any value at any time in the model programmatically by using the setValueAt() method. The isCellEditable() method only determines whether or not a cell value is changeable by a USER...that is, someone clicking or tabbing into the cell.
This is true for adding, updating, or removing row or cell data.


Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
hi guys,
sorry for not explaining my problem clearly,
actually when i press the button,i want a empty cell in the JTable and i want only that cell to be editable,so that i can write a value there.
is it possible,if so how?.
thanks,
lavanya
 
 
subject: editing a cell in a uneditable model of JTable
 
Similar Threads
Make JTable cells not editable
how to make specific jtable column uneditable?
JTable
JTABLE + JTEXTFIELD....
JTable