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

14
LINES

< > BotCompany Repo | #1033889 // moveToTopRightCorner backup

JavaX fragment (include)

1  
static int moveToTopRightCorner_inset = 20;
2  
3  
static <A extends Component> A moveToTopRightCorner(A a) {
4  
  ret moveToTopRightCorner(moveToTopRightCorner_inset, moveToTopRightCorner_inset, a);
5  
}
6  
7  
static <A extends Component> A moveToTopRightCorner(int insetX, int insetY, A a) {
8  
  swing {
9  
    Window w = getWindow(a);
10  
    if (w != null)
11  
      w.setLocation(getScreenSize().width-w.getWidth()-insetX, insetY);
12  
  }
13  
  ret a;
14  
}

Author comment

Began life as a copy of #1001432

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033889
Snippet name: moveToTopRightCorner backup
Eternal ID of this version: #1033889/1
Text MD5: 5cb62809e6bfddb5864a664ff65667c6
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-08 23:38:05
Source code size: 436 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 151
Referenced in: [show references]