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

12
LINES

< > BotCompany Repo | #1001431 // fillListWithStrings

JavaX fragment (include)

// thread-safe
static void fillListWithStrings(JList list, Cl<S> contents) {
  if (list == null) ret;
  final new DefaultListModel model;
  if (contents != null) for (S s : contents)
    model.addElement(empty(s) ? " " : s);
  swing { list.setModel(model); }
}

static void fillListWithStrings(final JList list, S[] contents) {
  fillListWithStrings(list, asList(contents));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001431
Snippet name: fillListWithStrings
Eternal ID of this version: #1001431/5
Text MD5: 1a178d4a2b0aee56c13d69a58e7a95c1
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-03 12:22:53
Source code size: 389 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 762 / 1106
Version history: 4 change(s)
Referenced in: #1001438 - fillTableWithStrings
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)