0
private Point getFirstMonitorSize() { // Here Point is org.eclipse.swt.graphics.Point
Display display = Display.getDefault();
if (display != null) {
Monitor[] monitors = display.getMonitors();
if (monitors.length == 1) {
Rectangle clientArea = monitors[0].getClientArea();
return new Point(clientArea.width/2, clientArea.height/2);
}
}
return null;
}
私は位置決めのためにこれを見つけましたが、私はウィザードのダイアログでどのように使用するのか分かりません。私はウィザードを作成しました。私はそれを常に中央に配置したいのですが、誰でも助けてくれますか?
ありがとうございます。これは動作します:) – pawarsantosh
答えを受け入れることを忘れないでください... –