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   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, 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: 520 / 799
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001431 & http://1001431.tinybrain.de