SWT 使窗体程序居中显示
来源:互联网 发布:2017年java工程师工资 编辑:程序博客网 时间:2024/05/16 17:29
SWT中使子窗体居中显示public class FrameCenter {public static void setFrameCenter(Shell shell){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);}public static void setdileCenter(Shell shell){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);}}
0 0
- SWT 使窗体程序居中显示
- SWT让窗体居中显示
- swt设置窗体居中
- swt设置窗体居中
- wince程序窗体 居中显示[C#]
- 如何使swt窗口居中显示
- 如何使swt窗口居中显示
- javaSwing窗体居中显示
- Java窗体居中显示
- Delphi 窗体居中显示
- java窗体居中显示
- 窗体居中显示
- JFrame窗体居中显示
- WPF窗体居中显示
- js新建窗体居中显示
- c# 窗体 显示居中 wince
- java窗体居中显示和全屏显示
- c#设置窗体在显示器居中显示
- 神秘的包装2
- 黑马程序员—JAVA面向对象
- wifi共享精灵轻松实现Dote局域网对战
- 后台拼json传到前台接收(非ajax)
- Nosql Mongodb之旅(9)—MongoDB高级查询の存储过程
- SWT 使窗体程序居中显示
- 深入理解JVM内幕
- 分数类的四则运算
- maven中运行maven-release-plugin插件异常问题
- 将时间戳 转成 时间
- 深入x86的内存寻址
- Nosql Mongodb之旅(10)—MongoDB Capped Collection
- 漫谈高数,特征向量物理意义
- 黑马程序员_学习笔记第21天——图形化界面