Libraryless. Click here for Pure Java version (4984L/28K).
static int moveToTopRightCorner_inset = 20; static <A extends Component> A moveToTopRightCorner(A a) { ret moveToTopRightCorner(moveToTopRightCorner_inset, moveToTopRightCorner_inset, a); } static <A extends Component> A moveToTopRightCorner(int insetX, int insetY, A a) { swing { Window w = getWindow(a); if (w != null) { var bounds = preferredScreenBounds(); w.setLocation(bounds.x2()-w.getWidth()-insetX, bounds.y1()+insetY); } } ret a; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001432 |
Snippet name: | moveToTopRightCorner |
Eternal ID of this version: | #1001432/9 |
Text MD5: | 9d3ec3d527470793a573bd7e1782703e |
Transpilation MD5: | ad533a74f46c3ba464a41d3ecf7ceae8 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-09 17:34:21 |
Source code size: | 492 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 746 / 1321 |
Version history: | 8 change(s) |
Referenced in: | [show references] |