swt设置窗体居中
来源:互联网 发布:会员推广系统源码 编辑:程序博客网 时间:2024/05/17 08:50
shell = new Shell();
shell.setSize(611, 375);
int width = shell.getMonitor().getClientArea().width;
int height = shell.getMonitor().getClientArea().height;
int x = shell.getSize().x;
int y = shell.getSize().y;
if(x > width)
{
shell.getSize().x = width;
}
if(y > height)
{
shell.getSize().y = height;
}
shell.setLocation((width - x) / 2, (height - y) / 2);
shell.setSize(611, 375);
int width = shell.getMonitor().getClientArea().width;
int height = shell.getMonitor().getClientArea().height;
int x = shell.getSize().x;
int y = shell.getSize().y;
if(x > width)
{
shell.getSize().x = width;
}
if(y > height)
{
shell.getSize().y = height;
}
shell.setLocation((width - x) / 2, (height - y) / 2);
- swt设置窗体居中
- swt设置窗体居中
- SWT让窗体居中显示
- SWT窗体属性设置
- SWT窗口居中的设置
- SWT 使窗体程序居中显示
- SWT窗体字体的设置
- SWT 设置窗体透明和最上
- SWT设置文本随窗体大小变化
- c#设置窗体在显示器居中显示
- c#设置窗体在显示器居中显示
- c# 设置窗体初始化为居中显示
- Java设置Swing窗体居中显示
- GUI_如何设置窗体居中的代码
- Java图形界面Swing之窗体居中设置
- Qt之设置窗体居中显示
- C#怎么设置子窗体在主窗体中居中
- SWT 窗口居中
- asp.net(C#)购物车
- 3D游戏从入门到精通-33
- JoyiStar AJAX WebShop即将推出3.0体验版
- 全新的JoyiStar AJAX WebShop3.0体验版预览
- JSP技巧:发送动态图像
- swt设置窗体居中
- Tomcat集群的三种负载均衡方式优缺点对照
- new和delete操作
- 遨游Hibernate之二
- Combox的数据源
- 论四核“冲动”的背后
- ISAPI Rewrite 配置简介
- apache-mod_rewrite详解
- Tomcat配置经验谈