Java jtable methods


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.