public static DefaultTableModel getAllDataAsTable ( ObjectTableModel model , Format [ ] formats , String [ ] columns ) { final List < List < Object > > table = getAllTableData ( model , formats ) ; final DefaultTableModel tableModel = new DefaultTableModel ( ) ; for ( String header : columns ) { tableModel . addColumn ( header ) ; } for ( List < Object > row : table ) { tableModel . addRow ( new Vector ( row ) ) ; } return tableModel ; }
Present data in javax . swing . table . DefaultTableModel form .