摘要: ////
loginShell.setLocation(display.getClientArea().width / 2 - loginShell.getSize().x/2, display
.getClientArea().height / 2 - loginShell.getSize().y/2);
////
////
Monitor primary = loginShell.getMonitor();
Rectangle bounds = primary.getBounds();
Rectangle rect = loginShell.getBounds();
int x = bounds.x + (bounds.width - rect.width) / 2;
int y = bounds.y + (bounds.height - rect.height) / 2;
if (x < 0)
x = 0;
if (y < 0)
y
阅读全文