Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   How to implement an undeditable JTable without overriding class DefaultTableModel (http://www.velocityreviews.com/forums/t952115-how-to-implement-an-undeditable-jtable-without-overriding-class-defaulttablemodel.html)

clusardi2k@aol.com 09-12-2012 04:25 PM

How to implement an undeditable JTable without overriding class DefaultTableModel
 
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,


All times are GMT. The time now is 01:12 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57