打开jDialog,如何控制显示大小

13161833011 2003-06-20 02:18:13
打开jDialog,如何控制显示大小
...全文
72 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hellomartin 2003-06-22
  • 打赏
  • 举报
回复
如果使用布局浏览器,就没有办法来控制他的大小!
cyicecream 2003-06-20
  • 打赏
  • 举报
回复
声明一个JDialog对象xx,然后
xx.setSize(int,int);来设置大小
shangqiao 2003-06-20
  • 打赏
  • 举报
回复
上面zoon是缩小(相对与屏幕)倍率
shangqiao 2003-06-20
  • 打赏
  • 举报
回复
我一般都又一个自己的类:
public class MyLocation{
private MyLocation(){}
public static void location(Component component,double zoon){
int windowWidth=...;//忘了,读取屏幕的宽度
int windowHeight=...;
int x,y,windth,heigth;
.
.
.
component.setSize(windth,heigth);
component.setLocation(x,y);
component.setVisible(true);
}
}
XKP 2003-06-20
  • 打赏
  • 举报
回复
试过
setSize吗?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧