1 | static void blinkWindowUsingSize(JWindow w) { |
2 | blinkWindowUsingSize(w, -1); |
3 | } |
4 | |
5 | static void blinkWindowUsingSize(final JWindow w, final int howOften) { |
6 | final Dimension size = w.getSize(); |
7 | awtEvery(w, 1000, new Runnable { |
8 | bool on = true; |
9 | int n = howOften*2; |
10 | |
11 | public void run() { |
12 | w.setSize((on = !on) ? size : new Dimension(0, 0)); |
13 | if (howOften > 0 && --n <= 1) |
14 | w.dispose(); |
15 | } |
16 | }); |
17 | } |
Began life as a copy of #1013344
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013347 |
Snippet name: | blinkWindowUsingSize - this one actually seems to work |
Eternal ID of this version: | #1013347/6 |
Text MD5: | 46409984b89b82e3611098ec3ee58d07 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-01-02 23:15:59 |
Source code size: | 442 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 386 / 432 |
Version history: | 5 change(s) |
Referenced in: | [show references] |