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

11
LINES

< > BotCompany Repo | #1021048 // selectedIndex - extended synonym of getSelectedIndex

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7909L/44K).

static int selectedIndex(JComboBox cb) {
  ret getSelectedIndex(cb);
}

static int selectedIndex(JList l) {
  ret getSelectedIndex(l);
}

static int selectedIndex(ButtonGroup group) swing {
  ret indexOfPred(buttonsInGroup(group), btn -> btn.isSelected());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021048
Snippet name: selectedIndex - extended synonym of getSelectedIndex
Eternal ID of this version: #1021048/3
Text MD5: 4d895be98bc44445a6d036167a9bbd78
Transpilation MD5: 23bdc26ad388c91ca915d30cc1bc1652
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-29 03:54:05
Source code size: 268 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 294 / 392
Version history: 2 change(s)
Referenced in: [show references]