static void fillTableWithData(final JTable table, L<L> rows, L<S> colNames) { fillTableWithData(table, rows, toStringArray(colNames)); } // thread-safe static void fillTableWithData(final JTable table, L<L> rows, S... colNames) { final DefaultTableModel model = fillTableWithData_makeModel(rows, colNames); // TODO: keep model if columns identical? setTableModel(table, model); } static DefaultTableModel fillTableWithData_makeModel(L<L> rows, S... colNames) { Pair<Object[][], O[]> p = fillTableWithData_makeData(rows, colNames); ret new DefaultTableModel(p.a, p.b) { public Class getColumnClass(int column) { return or(_getClass(getValueAt(0, column)), S.class); } public bool isCellEditable(int rowIndex, int columnIndex) { ret false; } }; }
Began life as a copy of #1001438
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004995 |
Snippet name: | fillTableWithData (strings, images, bools) - now makes table uneditable |
Eternal ID of this version: | #1004995/10 |
Text MD5: | 57ea3413414432b12254a68a49cf9750 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-07 00:14:13 |
Source code size: | 821 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 646 / 653 |
Version history: | 9 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1017624 - sexyTableWithData #1017625 - fillTableWithData_makeData |