最大外壳尺寸?

时间:2019-04-08 14:30:07

标签: java

我有一些代码不允许外壳程序(org.eclipse.swt.widgets.Shell)大于特定的基于运行线程的x和y。 还有其他解决方案吗? shlNtc是我的外壳的名称。

    shellSize = new Runnable() {
        public void run() {
            Point s = shlNtc.getSize();
            //System.out.println(s.x);
            //System.out.println(s.y);
            if(s.x > 980)
                shlNtc.setSize(980, 600);
            if(s.y > 600)
                shlNtc.setSize(980, 600);
            display.timerExec(50, this);                
        }
    };
    this.shellSize.run();

0 个答案:

没有答案
相关问题