Libraryless. Click here for Pure Java version (10770L/60K).
1 | static void tableDependButtons(JTable table, L<? extends Component> buttons) {
|
2 | for (Component c : buttons) |
3 | if (c instanceof JButton) {
|
4 | JButton b = cast c; |
5 | onTableSelectionChangedAndNow(table, -> b.setEnabled(table.getSelectedRow() >= 0)); |
6 | } |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004936 |
| Snippet name: | tableDependButtons |
| Eternal ID of this version: | #1004936/6 |
| Text MD5: | a43b691a8ba808eb7adc4010df872189 |
| Transpilation MD5: | dd88fc299187aedd20ea4db54cd7160d |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-04-05 17:13:16 |
| Source code size: | 270 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 870 / 978 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |