How to implement an undeditable JTable without overriding class DefaultTableModel

C

clusardi2k

I don't want to use the below code because my jTable is already defined. I dragged it from the Swing Palette, so I can't override the method. I'm still using the eloquent NetBeans "Design" View. This view gives me the ease ofjust dragging new controls to the form.

public class MyTableModel extends DefaultTableModel
{
public boolean isCellEditable(int row, int column)
{
if (col != 30)
{
return false;
}
else
{
return true;
}
}
}

Thank you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top