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

10
LINES

< > BotCompany Repo | #1004262 // sortTable - sort a JTable

JavaX fragment (include)

1  
static void sortTable(final JTable table) {
2  
  swingAndWait(r {
3  
    L<Map<S, S>> data = getTableData(table);
4  
    if (empty(data)) ret;
5  
    S sortKey = firstKey(first(data));
6  
    if (empty(sortKey)) ret;
7  
    data = sortedByField(data, sortKey);
8  
    dataToTable_uneditable(table, data);
9  
  });
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004262
Snippet name: sortTable - sort a JTable
Eternal ID of this version: #1004262/1
Text MD5: e4487110410efdcb04ff648c8ba88104
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-11 23:48:32
Source code size: 300 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 596 / 585
Referenced in: [show references]