Go4Expert Member
27Sep2011,16:18   #11
ewaldhorn's Avatar
Hi.

OK, I see you are a bit stuck.

I'll have to wait until I get home before I can write up some code for you.

Best regards,
Ewald
Go4Expert Member
27Sep2011,16:39   #12
rajasohaibmaroof's Avatar
thank u brother ! help me . i have been doing this jtable assignment form last one month n i want to get it done now ! desperately w8ng for ur post
Go4Expert Member
28Sep2011,00:38   #13
rajasohaibmaroof's Avatar
hi i m able to delete a selected row by using this code
Code:
private void selectedCol(JTable table){
    int row = table.getSelectedRow();
int col = table.getSelectedColumn();

Object value = (String)table.getValueAt(row, col);
System.out.println(row+""+col);
System.out.println("Value =: "+value);

if (col==2){
    defaultTableModel.removeRow(jTable1.getSelectedRow());
}
}
Code:
 private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {                                     
        // TODO add your handling code here:
        selectedCol(jTable1);
    }
but if a make col==3 then it wont work .that means m unable to make col 3 buttons clickable how should i do thats? thnx in advance
Go4Expert Member
28Sep2011,11:27   #14
ewaldhorn's Avatar
Hi.

I found a much better example on the internet at :

http://www.cordinc.com/blog/2010/01/...-a-jtable.html

The explanation and code is superior to mine, I humbly suggest you visit the website and read what the author wrote.

Best regards,
Ewald
Go4Expert Member
28Sep2011,18:20   #15
rajasohaibmaroof's Avatar
any one pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ee help me i m stuck here ): ( i am unable to click button in jtable