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

18
LINES

< > BotCompany Repo | #1018974 // Translucent JWindow Test (OK on Linux & Windows)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (4727L/26K).

!7

p-awt {
  new JWindow f;
  f.setAlwaysOnTop(true);
  int alpha = 128;
  f.setBackground(new Color(0,255,0, alpha));
  //f.setSize(512, 512);
  f.setBounds(200, 300, 400, 500);
  f.add(new JPanel {
    protected void paintComponent(Graphics g) {
      g.setColor(Color.RED);
      g.drawRect(0, 0, 511, 511);
    }
  });
  //f.setLocationRelativeTo(null);
  f.setVisible(true);
}

Author comment

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: 284 / 394
Version history: 6 change(s)
Referenced in: [show references]