Libraryless. Click here for Pure Java version (7505L/42K).
1 | static <A extends JComponent> A closeOnComponentHide(AutoCloseable closeable, A c) {
|
2 | if (closeable != null) {
|
3 | Var<AutoCloseable> var = new(closeable); |
4 | bindToComponent(c, null, -> close(getAndClear(var))); |
5 | } |
6 | ret c; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035148 |
| Snippet name: | closeOnComponentHide |
| Eternal ID of this version: | #1035148/3 |
| Text MD5: | e577721fcf8e5defa17332150325b117 |
| Transpilation MD5: | 2c8085a3231e362a871340d7d7803488 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-01 21:28:10 |
| Source code size: | 235 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 415 / 515 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |