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

11
LINES

< > BotCompany Repo | #1013342 // blinkWindowUsingShape

JavaX fragment (include)

1  
static void blinkWindowUsingShape(final JWindow w, final Shape shape) {
2  
  awtEveryAndNow(w, 1000, new Runnable {
3  
    bool on;
4  
    
5  
    public void run() {
6  
      w.setShape((on = !on) ? shape :
7  
        new Rectangle2D.Double(-10, -10, 1, 1));
8  
      if (on) w.repaint();
9  
    }
10  
  });
11  
}

Author comment

Began life as a copy of #1013340

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: #1013342
Snippet name: blinkWindowUsingShape
Eternal ID of this version: #1013342/5
Text MD5: 4a48edf08bcfd2967c3033d4c2f85d10
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 22:56:01
Source code size: 292 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 338 / 361
Version history: 4 change(s)
Referenced in: [show references]