首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

java中设置了当前窗体的大小,但就是没有效果,如何弄?帮帮忙

2012-01-08 
java中设置了当前窗体的大小,但就是没有效果,怎么弄?帮帮忙.java中设置了弹出窗体的当前窗体大小,但就是没

java中设置了当前窗体的大小,但就是没有效果,怎么弄?帮帮忙.
java中设置了弹出窗体的当前窗体大小,但就是没有效果.哪位大虾可以帮帮忙啊.谢谢.

[解决办法]
把jbInit贴出来看看
[解决办法]
代码呢?你用什么写的,记事本还是工具?把代码拿 出来看下才知道
[解决办法]
Editor editor=new Editor();
editor.setSize(700, 500);
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();//获取屏幕大小
int w = editor.getSize().width;
int h =editor.getSize().height;
int x = (dim.width-w)/2;
int y = (dim.height-h)/2;
editor.setLocation(x,y);
editor.setVisible(true);
[解决办法]
应该是参数设置有问题,将代码贴出来。
[解决办法]
Editor editor=new Editor();
editor.setSize(700, 500);
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();//获取屏幕大小
int w = editor.getSize().width;
int h =editor.getSize().height;
int x = (dim.width-w)/2;
int y = (dim.height-h)/2;
editor.setLocation(x,y);
editor.setVisible(true);
===========================================================
这是设置大小?

热点排行