Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1001313 // swingLater

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9752L/54K).

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);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001313
Snippet name: swingLater
Eternal ID of this version: #1001313/3
Text MD5: 279e9b798c5f37e79e31225d79f480fa
Transpilation MD5: c102d2640fcd6c49ea15239e8e0aeb87
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-26 17:52:59
Source code size: 342 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 676 / 1107
Version history: 2 change(s)
Referenced in: [show references]