static void disableAndRenameButtonWhileCalcing2(S newName, final O /*F0*/ f) { final JButton button = heldInstance(JButton); final AutoCloseable temp = tempDisableAndRenameButton(newName, button); thread { temp temp; if (isTrue(callF(f))) disposePossiblyInternalFrame(button); } }