Making ArrayList to JTable

后端 未结 2 1030
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 08:15

I have an

ArrayList>

Object, I need to display the content of this array in a JTable.

The Map - Ke

2条回答
  •  隐瞒了意图╮
    2021-01-06 08:59

    For datas embed your list in a TableModel. A DefaultTableModel is best.

    For columns, embed your list in a TableColumnModel. Best is a DefaultTableModel.

    Then use the jtable constructor to use that.

提交回复
热议问题