Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java GUI 设计 » Swing  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 swing 方法的 一个问题。
develop8





发贴: 129
积分: 0
于 2006-05-29 07:42 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
getSize(), setBounds(int, int, int, int)
有什么不同?俩个都是设置大小的是吗?



作者 Re:swing 方法的 一个问题。 [Re:develop8]
lisliefor





发贴: 287
积分: 7
于 2006-05-29 14:06 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
setSize(int,int) 设置组件大小,两个参数,前者表示组件的width,后者表示它的height。
setBounds(int,int,int,int) 设置组件在包含它的容器里的位置及它的大小。比如说:你在frame上添加了一个TextArea,如果该TextArea的实例调用这个方法,那么四个参数中,前两个int表示它左上角顶点在frame中的坐标(即设置它在frame中的位置),后两个跟setSize(int,int)中方法一样。
setBounds(int,int,int,int)方法等同于setSize(int,int)和setLocation(int,int)两个方法同时使用。
这些东西建议自己找书看,更容易理解和记忆。



作者 Re:swing 方法的 一个问题。 [Re:develop8]
develop8





发贴: 129
积分: 0
于 2006-06-03 08:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你真厉害,我打错的字你都能知道?
setSize() 打错为
getSize()




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   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