|
Controlling the row header's visibility |
Top Previous Next |
AdvancedJTable defines two methods for retrieving and assigning the header row's visibility:
public boolean getShowRowHeader();
public void setShowRowHeader(boolean show);
You can show or hide the row header in your own JTable class by manipulating the enclosing JScrollPane:
JScrollPane scroller = new JScrollPane();
//show the row header
scroller.setRowHeaderView(rowHeader);
//hide the row header
scroller.setRowHeaderView(null);