随笔 - 6  文章 - 129  trackbacks - 0
<2025年6月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 827176
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

重寫ApplicationWorkbenchWindowAdvisor類的postWindowOpen方法
public void postWindowOpen() {
  //窗口居中
  Shell shell = getWindowConfigurer().getWindow().getShell();
  Rectangle screenSize = Display.getDefault().getClientArea();
  Rectangle frameSize = shell.getBounds();
  shell.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);
 }



posted on 2008-12-05 23:40 Ke 阅读(391) 评论(0)  编辑  收藏 所属分类: eclipse RCP