1 | static int moveToTopCenter_inset = 20; |
2 | |
3 | static <A extends Component> A moveToTopCenter(A c) { |
4 | Window w = getWindow(c); |
5 | if (w != null) { |
6 | centerFrame(w); |
7 | Rectangle r = usableWindowArea(); |
8 | w.setLocation(w.getX(), r.y+moveToTopCenter_inset); |
9 | } |
10 | ret c; |
11 | } |
Began life as a copy of #1006779
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: | #1015077 |
Snippet name: | moveToTopCenter |
Eternal ID of this version: | #1015077/3 |
Text MD5: | b9c1dcf55de2259f76d7bdcd2ee9798e |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-07 21:19:07 |
Source code size: | 280 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 392 / 423 |
Version history: | 2 change(s) |
Referenced in: | [show references] |