Libraryless. Click here for Pure Java version (6509L/36K).
1 | static int showWindowInTopRightCorner_x = 25; |
2 | static int showWindowInTopRightCorner_y = 5; |
3 | |
4 | static JWindow showWindowInTopRightCorner(final JComponent c) { |
5 | if (isHeadless()) null; |
6 | ret swing(func -> JWindow { |
7 | JWindow window = makeWindow(c); |
8 | window.pack(); |
9 | Rectangle r = maxWindowBounds(); |
10 | window.setBounds(r.x+r.width-window.getWidth()-showWindowInTopRightCorner_x, r.y+showWindowInTopRightCorner_y, window.getWidth(), window.getHeight()); |
11 | window.setAlwaysOnTop(true); |
12 | window.setVisible(true); |
13 | ret window; |
14 | }); |
15 | } |
Began life as a copy of #1015133
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: | #1015141 |
Snippet name: | showWindowInTopRightCorner |
Eternal ID of this version: | #1015141/7 |
Text MD5: | 506bad64bdf6c1752d502a53c1fe0386 |
Transpilation MD5: | ced21a70aa8dc37210e1a06a9638e59c |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-27 09:44:56 |
Source code size: | 558 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 434 / 493 |
Version history: | 6 change(s) |
Referenced in: | [show references] |