code: 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;
      }
docs: Present data in javax.swing.table.DefaultTableModel form.
  
  @param model   {@link ObjectTableModel}
  @param formats Array of {@link Format} array can contain null formatters in this case value is added as is
  @param columns Columns headers
  @return data in table form