Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1019462 // addRowSorter_desc - add row sorter to JTable and sort desc by column

JavaX fragment (include)

static JTable addRowSorter_desc(final JTable table, final int column) {
  swing {
    if (table.getRowSorter() != null) ret;
    TableRowSorter sorter = new(table.getModel());
    pcall { sorter.setSortKeys(ll(new RowSorter.SortKey(column, SortOrder.DESCENDING))); }
    table.setRowSorter(sorter);
  }
  ret table;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019462
Snippet name: addRowSorter_desc - add row sorter to JTable and sort desc by column
Eternal ID of this version: #1019462/4
Text MD5: 138f4e91bda6401a7772cafadd121b69
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-01 22:30:05
Source code size: 327 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 394 / 438
Version history: 3 change(s)
Referenced in: [show references]