FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaGraph/Login.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
/
Login.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
64 lines (45 loc) · 1.01 KB
Breadcrumbs
JavaGraph
/
Login.java
Copy path
File metadata and controls
64 lines (45 loc) · 1.01 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
56
57
58
59
60
61
62
63
64
package
com
.
bj
;
import
javax
.
swing
.*;
import
java
.
awt
.*;
public
class
Login
extends
JFrame
{
//组件
JPanel
jp1
,
jp2
,
jp3
;
JButton
jb1
,
jb2
;
JLabel
jlb1
,
jlb2
;
JTextField
jtfl
;
JPasswordField
jpfl
;
public
static
void
main
(
String
[]
args
) {
// TODO Auto-generated method stub
Login
l
=
new
Login
();
}
public
Login
(){
//组件
jp1
=
new
JPanel
();
jp2
=
new
JPanel
();
jp3
=
new
JPanel
();
jlb1
=
new
JLabel
(
"用户名"
);
jlb2
=
new
JLabel
(
"密 码"
);
jtfl
=
new
JTextField
(
10
);
jpfl
=
new
JPasswordField
(
10
);
jb1
=
new
JButton
(
"登录"
);
jb2
=
new
JButton
(
"注册"
);
//设置JPanel布局
//jp1.setLayout(new FlowLayout());
this
.
setLayout
(
new
GridLayout
(
3
,
1
));
//添加组件
jp1
.
add
(
jlb1
);
jp1
.
add
(
jtfl
);
jp2
.
add
(
jlb2
);
jp2
.
add
(
jpfl
);
jp3
.
add
(
jb1
);
jp3
.
add
(
jb2
);
this
.
add
(
jp1
);
this
.
add
(
jp2
);
this
.
add
(
jp3
);
this
.
setSize
(
200
,
160
);
this
.
setLocation
(
200
,
200
);
this
.
setTitle
(
"Login"
);
this
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
this
.
setVisible
(
true
);
}
}
Back
|
FazBrowse Home
|
New Git URL