Libraryless. Click here for Pure Java version (4727L/26K).
1 | !7 |
2 | |
3 | p-awt { |
4 | new JWindow f; |
5 | f.setAlwaysOnTop(true); |
6 | int alpha = 128; |
7 | f.setBackground(new Color(0,255,0, alpha)); |
8 | //f.setSize(512, 512); |
9 | f.setBounds(200, 300, 400, 500); |
10 | f.add(new JPanel { |
11 | protected void paintComponent(Graphics g) { |
12 | g.setColor(Color.RED); |
13 | g.drawRect(0, 0, 511, 511); |
14 | } |
15 | }); |
16 | //f.setLocationRelativeTo(null); |
17 | f.setVisible(true); |
18 | } |
Began life as a copy of #1005621
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, nazvggbglmsf, pyentgdyhuwx, pzhvpgtvlbxg, tpturoigtvwk, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018974 |
Snippet name: | Translucent JWindow Test (OK on Linux & Windows) |
Eternal ID of this version: | #1018974/7 |
Text MD5: | 5636f40b75b15866a408dedd1ba6ce7a |
Transpilation MD5: | e2c0522582b3c31c0388b6f90361e906 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-09 16:11:21 |
Source code size: | 399 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 380 / 514 |
Version history: | 6 change(s) |
Referenced in: | [show references] |