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

7
LINES

< > BotCompany Repo | #1033551 // setBoundsSafely - set bounds of window, make sure it's within screen. TODO: excludes second screen

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4933L) is out of date.

static <A extends Window> A setBoundsSafely(A a, Rect r) {
  if (a != null && r != null) swing {
    setBounds(a, r);
    moveWindowIntoScreen(a);
  }
  ret a;
}

Author comment

Began life as a copy of #1009936

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033551
Snippet name: setBoundsSafely - set bounds of window, make sure it's within screen. TODO: excludes second screen
Eternal ID of this version: #1033551/5
Text MD5: 36d55b839fd7d9c3e195db82aef2a679
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-03 14:19:12
Source code size: 167 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 190
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)