I searched a lot and gave some answers to this question. But many of them have referred the link which gives a 404 error. I want to create such a table:
Is there any method in Java for this?
Indicates how to merge a custom TableUI
by creating a cell. There may be a problem in this example, which causes at least 6 StackOverflowError
in Java. To fix this, change the AttributiveCellTableModel.setDataVector ()
inside:
setColumnIdentifiers (COLUMNNAMES); With
:
this.columnIdentifiers = columnNames; Public Zero Setdictor (Vector New Data, Vector Column Name) {If (new data == empty) discard new invalid argument exception ("setDataVector () ->
zero parameter"); DataVector = new vector (0); // Set column indenters (column names); This.columnIdentifiers = columnNames; DataVector = new data; CellAtt = New DefaultCellAttribute (dataVector.size (), ColumnIdFactorySize ()); NewRowsAdded (New TableModelEvent (this, 0, getRowCount () - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); }
The problem is that calls to setColumnIdentifiers
in setDataVector
, hence triggering StackOverflowError
is. Once set, the example looks like:
< / P>
There is a solution prepared from here, unfortunately this is not free. For example, CellSpanTable
:
Comments
Post a Comment