FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaGraph/FlowLayout_t.java at master · goder/JavaGraph · GitHub
goder
JavaGraph
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaGraph
/
FlowLayout_t.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
55 lines (41 loc) · 1.09 KB
Breadcrumbs
JavaGraph
/
FlowLayout_t.java
Copy path
File metadata and controls
55 lines (41 loc) · 1.09 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package
com
.
bj
;
import
java
.
awt
.*;
import
javax
.
swing
.*;
public
class
FlowLayout_t
extends
JFrame
{
JButton
jb1
,
jb2
,
jb3
,
jb4
,
jb5
,
jb6
,
jb7
;
public
FlowLayout_t
() {
//创建组件
jb1
=
new
JButton
(
"张三"
);
jb2
=
new
JButton
(
"李四"
);
jb3
=
new
JButton
(
"王五"
);
jb4
=
new
JButton
(
"孙六"
);
jb5
=
new
JButton
(
"周七"
);
jb6
=
new
JButton
(
"郭八"
);
jb7
=
new
JButton
(
"刘九"
);
//添加组件
this
.
add
(
jb1
);
this
.
add
(
jb2
);
this
.
add
(
jb3
);
this
.
add
(
jb4
);
this
.
add
(
jb5
);
this
.
add
(
jb6
);
this
.
add
(
jb7
);
//设置布局管理器
//this.setLayout(new FlowLayout());
//this.setLayout(new FlowLayout(FlowLayout.LEFT));
this
.
setLayout
(
new
FlowLayout
(
FlowLayout
.
LEFT
));
//设置固定窗口
this
.
setResizable
(
false
);
//设置窗体属性
this
.
setTitle
(
"浮动布局案例"
);
this
.
setSize
(
300
,
300
);
this
.
setLocation
(
200
,
200
);
this
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
//显示
this
.
setVisible
(
true
);
}
public
static
void
main
(
String
[]
args
) {
// TODO Auto-generated method stub
FlowLayout_t
f
=
new
FlowLayout_t
();
}
}
Back
|
FazBrowse Home
|
New Git URL