I'm not sure if you can do the entire column at once. You can probably loop through it using the stuff I included.
Try this:
How can I make table cells uneditable?
Your TableModel must return false from isCellEditable(row, column).
DefaultTableModel always returns true from this method. You need to write a subclass to change this, for example an anonymous one:
DefaultTableModel data = new DefaultTableModel(....)
{
public boolean isCellEditable(int row, int column)
{
return <insert condition>;
}
};
This info was taken from here:
http://www.chka.de/swing/t
Hope this helps,
guidway
http://www.chka.de/swing/t
Main Topics
Browse All Topics





by: sanjay_thakurPosted on 2002-01-25 at 10:27:09ID: 6756687
Your TableModel must return false from isCellEditable(row, column).
DefaultTableModel always returns true from this method. You need to write a subclass to change this, for example an anonymous one:
DefaultTableModel data = new DefaultTableModel(....)
{
public boolean isCellEditable(int row, int column)
{
return <insert condition>;
}
};