How to disable entire row in JTable?

Hi to all,
I have a JTable where i added JCheckboxes to single column.
The Checkboxes automatically increments when new row is added.
My problem is that i need to disable the row of which the checkbox is selected.
when i used
setEnabled(false);
the entire column is disabled.
plz any one can help me out.
Thanks In advance.

Override JTable#isCellEditable to return false for the row.
db

Similar Messages

  • How to select a row in Jtable at runtime

    how to select a row in Jtable at runtime.

    use
    setRowSelectionInterval(int fromRowIndex, int toRowIndex);example if your table has 10 rows then u want to select the rows from 4 to 8 then use
    setRowSelectionInterval(3, 7);if you want to select just one row for example 5 then use
    setRowSelectionInterval(5, 5);

  • How to remove a row from JTable

    Hi!
    I'm used to remove rows from JTables getting the model and doing a removeRow(num) like this:
    ((DefaultTableModel)jTable1.getModel()).removeRow(0);
    But with ADF and JDeveloper the model says it's a JUTableBinding.JUTableModel but its not accessible.
    How to remove a row in Jdeveloper 10.1.3.4.0?

    Or maybe is just better to refresh data in the jTable but I do not know either like doing it.

  • How to set special rows in jtable not selectable

    Hello programmers,
    anybody knows how to set special rows(p.E. row 0) in jtable not selectable.
    in advance thanks for your answers

    table = new JTable(...)
         public void changeSelection(int row, int column, boolean toggle, boolean extend)
              if (row == 0)
                   return;
              else
                   super.changeSelection(row, column, toggle, extend);
    };

  • How to select a row in JTable for right mouse click ?

    Hi All,
    I need to select a row on JTable for right mouse click ?
    Can any one help me ?
    Thanks a lot.
    Seelam.

    Got solution...
    tabel.addRowSelectionInterval(..) works.
    thanks.

  • How to disable some rows in a matrix

    Hi experts
    I have a matrix
    i want to do set line/rows disable and can't edit in rows
    please post example code
    thank you

    As far as I know there is no direct way to do this - you can only set columns editable or non-editable.
    A workaround could be:
    catch the "got_focus" event on the beforeaction=true; check if it is your matrix (pVal.ItemUID) and if it is your row that you want disabled (pVal.row) - if it is, set bubbleevent = false to stop it (and maybe display a status bar message to users so they don't think its a bug)
    Additionally for a visual clue, maybe put some sort of field at the start of the row that says "open" or "closed" or something, this way the user wont be confused when they cant enter the row.
    If got focus doesn't work properly (I havent tested) maybe try some other event like click or keypressed.

  • How to exclude entire row based on single column

    Hello there,
    I'm trying to hide an entire row if column does not equal 'E' and can't seem to get it to work. Here is code i am using inside the group:
    <?for-each:current-group()?>
    <?if@row:recordType != 'E'?><?end if?>
    <?end for-each:current-group?>
    What am i missing? Also note that the column i am trying to filter on is in the xml but not being displayed in the report.
    Edited by: [email protected] on Mar 30, 2010 3:05 PM

    Hi Steve,
    I have a similar requirement... one of the columns in my table is a calculated value based on several xml fields,
    <?xdofx:(MATH01+MATH02+MATH03+MATH04+MATH05+AA+AA1)+((FNDCD01+FNDCD02+FNDCD03+FNDCD04+FNDCD05+MCHCD01+MCHCD02) div '8')?>
    if the resultant value above is less than 62, i do no want to display this entire row in the output. could you help me wout with this?
    thanks
    Domnic

  • How to disable delete row in sales order

    Hi
    Is possible to disable the functions to delete row in Sales Order and Purchase Order.
    How can we made that? by SDK or exist anything else?
    Regards
    VS
    Edited by: Vasco Silva on Jan 8, 2009 8:24 PM

    There is no out of the box solution to disable row deleting function.  The alternative can be used would be approval procedure.  If the documents are subject to approval, all rows will be locked from any changes.
    Thanks,
    Gordon

  • How to select a row in JTable

    Hello,
    I have a problem selecting a row in a JTable.
    I use
    mytable.getSelectionModel().setSelectionInterval(row, row);
    to select a row, but after that this row is only highlighted. After calling this method I cannot change the selection using the arrow keys.
    Can anybody give me a hint, how I can get the row selected, so that I can use the arrow keys immediately after selecting the row?
    Any help is welcome.
    Thanks,
    Fritz

    Hello,
    I got the solution:
    final int pRow = row;
    final int pCol = column;
    final JTable myTable = mytable;
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    myTable.requestFocusInWindow();
    myTable.changeSelection(pRow, pCol, true, true);

  • How to disable arrow keys in JTable.

    Hi ,
    I'm using Jtable and when pressing shift + arrow keys the rows get selected. I want to avoid this situation.
    Thanks
    Manjula

    This posting shows how to remove a default Action;
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=657819

  • How to Remove Checked Rows from JTable

    Hello All,
    I am currently working on a JTable, in which I have also include a JCheckbox. What i have to do is to remove all the Rows which are Checked in the JTable, when the 'Delete' button is clicked.
    Please tell me how i can this can be done, it will be of great help.
    Thanks,
    Shikha

    Loop through the TableModel, Use the getValueAt(...) method to find rows with a selected checkBox. Then use the removeRow(...) method of the DefaultTableModel to remove the row.
    Note: make sure your loop starts at the last row of the table and counts down to 0, to simplify the delete logic.

  • How to select first row of JTable by default

    Hi,
    I have a JTable with 5 rows.
    When the software starts, none of the rows are selected.
    I wish to keep the first row selected by default.
    How do I do it?
    I couldnt find any method like setSelectedRow() !!!
    Does anyone have a sample code plz?
    Thanks.
    Anuj

    couldnt find any method like
    setSelectedRow()You need to use getSelectionModel() first.
    Another way is to use:
    table.changeSelection(0, 0, false, false);

  • How to insert new row in JTable?

    In my application,I have a jTable. And the form dose not have a Nevigation bar.
    After I retrieve a record into the jTable, I want to add a new row after the retrieved record. But I could not create a new row by pressing the down key at the last row of the jTable(I could do that in Oracle Form). Dose jTabel have such feature as that in Oracle Form? Or I can do that in another way?

    Such a feature is not available, but you could add a key event handler which works its magic when it detects a press on the down arrow key, while the last row is selected. Then you can perform the code to insert a new row.

  • How to disable moving Columns in JTable

    Hi,
    How can I make sure that the columns in my JTable cannot be moved?
    Any ideas?
    thanks

    How about:myTable.getTableHeader().setReorderingAllowed(false);

  • How to make first row of JTable bold

    I am working with JTable and unable to change to 1st row to BOLD

    harshal_2010 wrote:
    hi codingMonkey I know that u r very smart guy who doesn't know anythingWow! Could you really deduce that from a simple 'Why?'. Brilliant; absolutely phenomenal!
    Oh, and by the way, I hope you like helping yourself. Saying "Hey, you stupid ugly jerk, will you help me with my question?" generally doesn't go down well on these fora.

Maybe you are looking for

  • Cant Get Rid Of The Sad Ipod Screen

    Ok, well it shows the sad ipod screen, and when I plug it into the computer it shows a battery picture with the charging lightning bolt but it isnt charging. Those "5 R's" didnt do a thing because my computer dosnt even acknowledge that its plugged i

  • Why i have problem when start the game "GRID 2" it says "Minimum of Pentium D or Althon 64 x2 Required"

    When i start game Grid 2 in windows 7 it says "Minimum of Pentium D or Althon 64 x2 Required". I contacted them but they said i have macbook pro so i should contact to apple

  • High Pitch sound after inserting MAC OS x DVD on superdrive

    When inserted the Mac OS x DVD to install Windows Drivers in bootCamp the drive started to make a high pitch sound (loud) while rotating on high speed. Is this normal? I've tested with a DVD-R disk and didn't noticed any noise, but the disk rotates a

  • Can't upgrade my kernel

    I just tried to update my system to the latest kernel and I'm getting the following error: error: could not prepare transaction error: failed to commit transaction (conflicting files) kernel26: /lib/modules/2.6.21-ARCH/modules.alias exists in filesys

  • Pavilion G6 2301ax Laptop Bluetooth not working.

    Problem since last week. my Ralink RT3290 wifi adapter + 4.0 bluetooth stopped working i replaced that with a new one at first it was showing Bluetooth and Wifi in device manager and wifi is working ok. but bluetooth was unable to connect to any devi