Libraryless. Click here for Pure Java version (7213L/42K).
1 | static AutoCloseable tempSetButtonImage(JButton btn, ImageIcon img) { |
2 | if (btn == null) null; |
3 | ret swing(-> { |
4 | Icon oldIcon = btn.getIcon(); |
5 | setButtonImage(btn, img); |
6 | ret autoCloseable { setButtonImage(btn, oldIcon); }; |
7 | }); |
8 | } |
Began life as a copy of #1023958
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033903 |
Snippet name: | tempSetButtonImage |
Eternal ID of this version: | #1033903/1 |
Text MD5: | 20aa21eae7adb425e5958e2911beddd6 |
Transpilation MD5: | 3d3b8c4ca8c3ee9f5f9abe22cfe3f77a |
Author: | stefan |
Category: | javax / android |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-09 19:35:44 |
Source code size: | 247 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 182 / 219 |
Referenced in: | [show references] |