- 1、本文档共21页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
JAVA布局(国外英文资料)
JAVA布局(国外英文资料)
GridBagLayout
Set the component location free
The pre-set layout is the setLayout () parameter empty, setLayout (null).
Create a layout in the component (x, y) coordinates and width and height as parameters.
The setBonds (int x, int y, int w, int h)) : the parameters are the coordinates and the width, the height.
SetSize (int, int) sets the size of the component
SetLocation (int, int) sets the coordinates of the component
Example: Rectangle re = new Rectangle (10, 10, 50, 30);
Button. The setBounds (re);
FlowLayout
The constructor:
FlowLayout () : set up the order layout manager, by default the components on each row will be centered;
FlowLayout (int) : specifies the alignment, no parameters, flowlayout.center, or 1: the components on each line will be centered; Parameter flowlayout.left or 0: left-aligned; Parameter FlowLayout. RIGHT or 2: RIGHT alignment.
FlowLayout (int, int) : FlowLayout. LEFT LEFT, FlowLayout. Parameter 2: horizontal spacing between components, per pixel; Parameter 3: vertical spacing between components, per pixel.
Methods:
SetLayout () : associated the container with the layout manager;
Getalize () : to get the alignment;
Setaliting () : setting up the alignment;
SetHgap () : set horizontal spacing;
SetVgap () : set the vertical spacing.
GridLayout
The constructor:
The GridLayout (int, int) parameter is the number of rows and the number of columns. If the number of rows, the number of columns and the actual discrepancy, satisfy the number of rows first.
The GridLayout (int, int, int, int) parameter one, two: the number of rows and the number of columns; Parameter 3, 4: horizontal spacing and vertical spacing. The default horizontal spacing and vertical spacing are zero.
Methods:
SetHgap () : set horizontal spacing;
SetVgap () : set the vertical spacing.
Border layout
The constructor:
GridBagLayout () : creates a grid bag layout;
GridBagConstraints () : creates a grid bag layout helper. Used to set the properties of the component
您可能关注的文档
- AVR控制矩阵键盘,12864显示简单计算器(国外英文资料).doc
- AWOS 题库基础知识部分(选择题)(国外英文资料).doc
- apache+mysql+php_for_linux全攻略(国外英文资料).doc
- AutoCAD 2002 完全使用手册(DOC) ch16_ok(国外英文资料).doc
- bat自动按键(国外英文资料).doc
- autorun.inf编写方法搜集(国外英文资料).doc
- Beyond 3G移动通信系统的小区搜索算法 - C114(国外英文资料).doc
- BIOS升级篇(国外英文资料).doc
- AYHFDIO(国外英文资料).doc
- bios的设置与端口的分类(国外英文资料).doc
文档评论(0)