zoukankan      html  css  js  c++  java
  • JFace中WizardDialog默认居中

     WizardDialog 默认弹出不居中,下面是让其居中的代码

      WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), new ScanWizard());
      dlg.setPageSize(560, 320);
      dlg.create();
            //设置窗口自动居中
            Rectangle screenSize = Display.getDefault().getClientArea();
            Shell shell =dlg.getShell();
            shell.setLocation((screenSize.width - dlg.getShell().getBounds().width) / 2,(
                    screenSize.height -dlg.getShell().getBounds().height) / 2);
      dlg.open();

  • 相关阅读:
    csp-s模拟110
    csp-s模拟109
    留念
    csp-s 2019 游记
    HEOI2020
    CSP-S2019记
    堆积的$TIPS$
    低错复习
    倍增并查集
    4.26
  • 原文地址:https://www.cnblogs.com/wuhenke/p/2384085.html
Copyright © 2011-2022 走看看