I Created two Jtable table1 and table2. I give table1 header to table2 by this code.
table2.setTableHeader(table1.getTableHeader());
but i also want to give properties of table1 header to table2. like Sorting and Margin re-sizing.
I Created two Jtable table1 and table2. I give table1 header to table2 by this code.
table2.setTableHeader(table1.getTableHeader());
but i also want to give properties of table1 header to table2. like Sorting and Margin re-sizing.
but i also want to give properties of table1 header to table2. like Sorting and Margin re-sizing.
to share TableColumnModel for both JTables,
to use, override methods columnMarginChanged
and columnMoved
, both are implemented in TableColumnModelListener,
like Sorting
Sorting is controlled by the RowSorter so I would guess you also need to share the sorter.
Read the secton from the Swing tutorial on Sorting and Filtering for more information.
I guess you would use getRowSorter(...)
on table1 and setRowSorter(...)
on table2.