Posted By

resurge on 04/24/09


Tagged

table java jtable


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

luciacalvom


Java jtable methods


 / Published in: Java
 

  1. tblTable.setAutoCreateRowSorter(true); //will make the colums sortable
  2. tblTable.setCellSelectionEnabled(false); //will diable the selection of single cells
  3. tblTable.setRowSelectionAllowed(true); //set it so that when you click a row, the entire row will be selected
  4. tblTable.setColumnSelectionAllowed(false); //set it so that you can't select entire columns
  5. tblTable.getTableHeader().setReorderingAllowed(false); //disable the changing of column positions

Report this snippet  

You need to login to post a comment.