Topic: 请教 有关JFrame对象位置问题

  Print this page

1.请教 有关JFrame对象位置问题 Copy to clipboard
Posted by: lypyh
Posted on: 2004-12-12 16:07

我想要控制JFrame对象在屏幕显示的位置,应该怎么做?
谢谢

2.Re:请教 有关JFrame对象位置问题 [Re: lypyh] Copy to clipboard
Posted by: kavinwang
Posted on: 2004-12-13 09:23

setLocation()

3.Re:请教 有关JFrame对象位置问题 [Re: lypyh] Copy to clipboard
Posted by: bluecolor
Posted on: 2004-12-13 11:12

在屏幕中间
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((screenSize.width - this.getWidth()) / 2,
(screenSize.height - this.getHeight()) / 2);


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923