Libraryless. Click here for Pure Java version (4719L/26K).
1 | static <A> L<A> getComboBoxItems(JComboBox<A> cb) {
|
2 | ret cb == null ?: swing(-> {
|
3 | ComboBoxModel<A> model = cb.getModel(); |
4 | int n = model.getSize(); |
5 | L<A> l = emptyList(n); |
6 | for i to n: |
7 | l.add(model.getElementAt(i)); |
8 | ret l; |
9 | }); |
10 | } |
Began life as a copy of #1020160
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: | #1020161 |
| Snippet name: | getComboBoxItems |
| Eternal ID of this version: | #1020161/3 |
| Text MD5: | ce9cc2b15319426584ab25004e5093a6 |
| Transpilation MD5: | 0181f326a6791e0a156474692aff0fe6 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-01-13 16:19:51 |
| Source code size: | 262 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 542 / 670 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |