static AutoCloseable tempSetButtonImage(JButton btn, ImageIcon img) { if (btn == null) null; ret swing(-> { Icon oldIcon = btn.getIcon(); setButtonImage(btn, img); ret autoCloseable { setButtonImage(btn, oldIcon); }; }); }