Libraryless. Click here for Pure Java version (10075L/61K).
1 | sclass ShowComboBoxForm {
|
2 | S desc; |
3 | S itemDesc; |
4 | LS items; |
5 | S defaultValue; |
6 | IVF1<S> action; |
7 | JComboBox cb; |
8 | |
9 | S selected() { ret selectedItem(cb); }
|
10 | |
11 | void run aka show() {
|
12 | cb = jComboBox(items, defaultValue); |
13 | showFormTitled(desc, |
14 | "", jlabel(desc), |
15 | itemDesc, cb, |
16 | rThread {
|
17 | S item = selected(); |
18 | printVars(+item, +action); |
19 | if (nempty(item)) |
20 | action.get(item); |
21 | }); |
22 | } |
23 | } |
Began life as a copy of #1015667
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031798 |
| Snippet name: | ShowComboBoxForm |
| Eternal ID of this version: | #1031798/6 |
| Text MD5: | b47a0073a1295531c33164d8b2273ea4 |
| Transpilation MD5: | 119f0e0edbc3eeb0d9888b9628ac979a |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-07-01 17:44:21 |
| Source code size: | 467 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 501 / 700 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |