易截截图软件、单文件、免安装、纯绿色、仅160KB

Java SWT 窗口居中对齐

public static void CentreWnd(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);
}


相关文档:

java笔记(1)


public class Parent {
    private String name;
    public String getName() {
return name;
    }
    public void setName(String name) {
this.name = name;
    }
    public void ppublicMethod(){
  ......

java错题集


正多边形中最长的对角线就是主对角线,其余的对角线就是副对角线
lang 是 language(语言) 的简写
是java中常用方法最多的包
包含常用类
 
 
 
Runnable接口,只有一个方法run()
exit(int status)
          终止当前正在运行的 Jav ......

java tips

1,int与bytes 转换
int转换成bytes
public
static
final
byte
[]
int2bytes
(
int
value
)

{
return
new
byte
[]

{
(
byte
)(
value
>>>
24
),
(
byte
)(
value
>>>
16
),
......

JAVA System.getProperty()参数


Java代码 < type="application/x-shockwave-flash" width="14" height="15" src="http://xiaoxinshome.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" quality="high" flashvars="clipboard=%20%20%20%20%20 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号