Libraryless. Click here for Pure Java version (7505L/42K).
static <A extends JComponent> A closeOnComponentHide(AutoCloseable closeable, A c) { if (closeable != null) { Var<AutoCloseable> var = new(closeable); bindToComponent(c, null, -> close(getAndClear(var))); } ret c; }
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: | 156 / 209 |
Version history: | 2 change(s) |
Referenced in: | [show references] |