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

5
LINES

< > BotCompany Repo | #1014369 // selectedRowCountListButton_update

JavaX fragment (include)

1  
static void selectedRowCountListButton_update(JList list, JButton b, S text) {
2  
  int c = list.getSelectedIndices().length;
3  
  setEnabled(b, c > 0);
4  
  setText(b, c > 0 ? text + " (" + c + ")" : text);
5  
}

Author comment

Began life as a copy of #1014250

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014369
Snippet name: selectedRowCountListButton_update
Eternal ID of this version: #1014369/1
Text MD5: b19bdad22c306ef607f9f2480c2cdeda
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-20 16:48:53
Source code size: 204 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 343 / 377
Referenced in: [show references]