static void swingLater(long delay, final O r) { javax.swing.Timer timer = new javax.swing.Timer(toInt(delay), actionListener(wrapAsActivity(r))); timer.setRepeats(false); timer.start(); } static void swingLater(O r) { var runnable = toRunnable(r); executingSwingCode(runnable); SwingUtilities.invokeLater(runnable); }