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

7
LINES

< > BotCompany Repo | #1033898 // centerDialogOverOwner

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

Libraryless. Click here for Pure Java version (5053L/28K).

svoid centerDialogOverOwner(JDialog dialog) {
  if (dialog != null) swing {
    var owner = dialog.getOwner();
    if (owner != null)
      setLocation(dialog, center(boundsRect(owner)));
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033898
Snippet name: centerDialogOverOwner
Eternal ID of this version: #1033898/2
Text MD5: dcfd2bcfa428978604037f5400ee7e06
Transpilation MD5: 9e245ecc32a0c25a1e1f14b6056ed79c
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-09 18:55:24
Source code size: 199 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 186 / 274
Version history: 1 change(s)
Referenced in: [show references]