Libraryless. Click here for Pure Java version (324L/3K/12K).
1 | !752 |
2 | |
3 | sS imageID = |
4 | // "#1003543"; |
5 | "#1005616"; |
6 | |
7 | p-awt { |
8 | JLabel label = new JLabel(imageIcon(imageID)); |
9 | label.setOpaque(false); |
10 | new JWindow w; |
11 | w.add(label); // add it to get appropriate size through pack() |
12 | w.pack(); |
13 | Rectangle maxBounds = maxWindowBounds(); |
14 | w.setLocation(150, maxBounds.y+maxBounds.height-w.getHeight()-20); |
15 | Rectangle r = w.getBounds(); |
16 | |
17 | Rectangle r2 = intersectWithScreen(r); |
18 | BufferedImage background = shootScreen2(r2); |
19 | //w.setLayout(null); |
20 | w.remove(label); |
21 | new JLayeredPane layeredPane; |
22 | Rectangle bounds = new Rectangle(0, 0, w.getContentPane().getWidth(), w.getContentPane().getHeight()); |
23 | w.add(layeredPane); |
24 | JLabel lBackground = new JLabel(imageIcon(background)); |
25 | lBackground.setBounds(0, 0, r2.width, r2.height); |
26 | layeredPane.add(lBackground, new Int(1)); |
27 | label.setBounds(bounds); |
28 | layeredPane.add(label, new Int(2)); |
29 | revalidate(w); |
30 | |
31 | //w.setLocation(200, 100); |
32 | w.setAlwaysOnTop(true); |
33 | w.setVisible(true); |
34 | } |
Began life as a copy of #1005620
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005622 |
Snippet name: | Show Animated GIF Somewhere On Screen With Home-Made Translucency |
Eternal ID of this version: | #1005622/1 |
Text MD5: | 95a686322fe0e49aeea8e3c466446a44 |
Transpilation MD5: | a45c644e26f5579a9c10b19b41889544 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-11-30 13:23:59 |
Source code size: | 1014 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 536 / 640 |
Referenced in: | [show references] |