How to implement an undeditable JTable without overriding class DefaultTableModel

Discussion in 'Java' started by clusardi2k@aol.com, Sep 12, 2012.

  1. Guest

    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,
     
    , Sep 12, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aloys Oberthuer
    Replies:
    3
    Views:
    7,528
    Aloys Oberthuer
    Apr 22, 2004
  2. Deshaies
    Replies:
    3
    Views:
    4,554
    Deshaies
    Apr 20, 2004
  3. Parvinder
    Replies:
    2
    Views:
    7,015
    PuneetNanda9
    Jun 15, 2012
  4. Cyril Dex

    DefaultTableModel

    Cyril Dex, Sep 20, 2004, in forum: Java
    Replies:
    2
    Views:
    3,712
    Nigel Wade
    Sep 21, 2004
  5. pat270881

    JTable - DefaultTableModel

    pat270881, Apr 11, 2005, in forum: Java
    Replies:
    0
    Views:
    3,433
    pat270881
    Apr 11, 2005
Loading...

Share This Page