Skip to content

Commit 181f45a

Browse files
committed
Java第二十五天
1 parent d710a8f commit 181f45a

File tree

203 files changed

+8923
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+8923
-0
lines changed

day25/GUI布局.bmp

2.22 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Eclipse版本的登录注册</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.7
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
4+
<Properties>
5+
<Property name="defaultCloseOperation" type="int" value="3"/>
6+
</Properties>
7+
<SyntheticProperties>
8+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
9+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
10+
</SyntheticProperties>
11+
<AuxValues>
12+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
13+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
14+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
15+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
16+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
17+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
18+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
19+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
20+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
21+
</AuxValues>
22+
23+
<Layout>
24+
<DimensionLayout dim="0">
25+
<Group type="103" groupAlignment="0" attributes="0">
26+
<Group type="102" alignment="1" attributes="0">
27+
<EmptySpace max="32767" attributes="0"/>
28+
<Group type="103" groupAlignment="0" attributes="0">
29+
<Group type="102" attributes="0">
30+
<Component id="jtfGuessNumber" min="-2" pref="154" max="-2" attributes="0"/>
31+
<EmptySpace type="separate" max="-2" attributes="0"/>
32+
<Component id="guessButton" min="-2" max="-2" attributes="0"/>
33+
</Group>
34+
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
35+
</Group>
36+
<EmptySpace min="-2" pref="46" max="-2" attributes="0"/>
37+
</Group>
38+
</Group>
39+
</DimensionLayout>
40+
<DimensionLayout dim="1">
41+
<Group type="103" groupAlignment="0" attributes="0">
42+
<Group type="102" alignment="0" attributes="0">
43+
<EmptySpace min="-2" pref="46" max="-2" attributes="0"/>
44+
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
45+
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
46+
<Group type="103" groupAlignment="3" attributes="0">
47+
<Component id="jtfGuessNumber" alignment="3" min="-2" max="-2" attributes="0"/>
48+
<Component id="guessButton" alignment="3" min="-2" max="-2" attributes="0"/>
49+
</Group>
50+
<EmptySpace pref="36" max="32767" attributes="0"/>
51+
</Group>
52+
</Group>
53+
</DimensionLayout>
54+
</Layout>
55+
<SubComponents>
56+
<Component class="javax.swing.JLabel" name="jLabel1">
57+
<Properties>
58+
<Property name="text" type="java.lang.String" value="&#x7cfb;&#x7edf;&#x5df2;&#x7ecf;&#x4ea7;&#x751f;&#x4e86;&#x4e00;&#x4e2a;&#x968f;&#x673a;&#x6570;,&#x8bf7;&#x8f93;&#x5165;&#x4f60;&#x8981;&#x731c;&#x7684;&#x6570;&#x636e;(1-100)"/>
59+
</Properties>
60+
</Component>
61+
<Component class="javax.swing.JTextField" name="jtfGuessNumber">
62+
</Component>
63+
<Component class="javax.swing.JButton" name="guessButton">
64+
<Properties>
65+
<Property name="text" type="java.lang.String" value="&#x6211;&#x731c;"/>
66+
</Properties>
67+
<Events>
68+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="guessButtonActionPerformed"/>
69+
</Events>
70+
</Component>
71+
</SubComponents>
72+
</Form>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
4+
<NonVisualComponents>
5+
<Component class="javax.swing.JLabel" name="jLabel2">
6+
<Properties>
7+
<Property name="text" type="java.lang.String" value="jLabel2"/>
8+
</Properties>
9+
</Component>
10+
</NonVisualComponents>
11+
<Properties>
12+
<Property name="defaultCloseOperation" type="int" value="3"/>
13+
<Property name="resizable" type="boolean" value="false"/>
14+
</Properties>
15+
<SyntheticProperties>
16+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
17+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
18+
</SyntheticProperties>
19+
<AuxValues>
20+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
21+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
22+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
23+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
24+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
25+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
26+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
27+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
28+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
29+
</AuxValues>
30+
31+
<Layout>
32+
<DimensionLayout dim="0">
33+
<Group type="103" groupAlignment="0" attributes="0">
34+
<Group type="102" alignment="0" attributes="0">
35+
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
36+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
37+
<Group type="102" attributes="0">
38+
<Component id="loginButton" min="-2" max="-2" attributes="0"/>
39+
<EmptySpace pref="124" max="32767" attributes="0"/>
40+
<Component id="resetButton" min="-2" max="-2" attributes="0"/>
41+
</Group>
42+
<Group type="102" attributes="0">
43+
<Group type="103" groupAlignment="0" attributes="0">
44+
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
45+
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
46+
</Group>
47+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
48+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
49+
<Component id="jtfUsername" max="32767" attributes="0"/>
50+
<Component id="jpfPassword" pref="190" max="32767" attributes="0"/>
51+
</Group>
52+
</Group>
53+
</Group>
54+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
55+
<Component id="registButton" min="-2" max="-2" attributes="0"/>
56+
<EmptySpace max="32767" attributes="0"/>
57+
</Group>
58+
</Group>
59+
</DimensionLayout>
60+
<DimensionLayout dim="1">
61+
<Group type="103" groupAlignment="0" attributes="0">
62+
<Group type="102" alignment="0" attributes="0">
63+
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
64+
<Group type="103" groupAlignment="3" attributes="0">
65+
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
66+
<Component id="jtfUsername" alignment="3" min="-2" max="-2" attributes="0"/>
67+
<Component id="registButton" alignment="3" min="-2" max="-2" attributes="0"/>
68+
</Group>
69+
<EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
70+
<Group type="103" groupAlignment="3" attributes="0">
71+
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
72+
<Component id="jpfPassword" alignment="3" min="-2" max="-2" attributes="0"/>
73+
</Group>
74+
<EmptySpace pref="57" max="32767" attributes="0"/>
75+
<Group type="103" groupAlignment="3" attributes="0">
76+
<Component id="loginButton" alignment="3" min="-2" max="-2" attributes="0"/>
77+
<Component id="resetButton" alignment="3" min="-2" max="-2" attributes="0"/>
78+
</Group>
79+
<EmptySpace min="-2" pref="79" max="-2" attributes="0"/>
80+
</Group>
81+
</Group>
82+
</DimensionLayout>
83+
</Layout>
84+
<SubComponents>
85+
<Component class="javax.swing.JLabel" name="jLabel1">
86+
<Properties>
87+
<Property name="text" type="java.lang.String" value="&#x7528;&#x6237;&#x540d;:"/>
88+
</Properties>
89+
</Component>
90+
<Component class="javax.swing.JLabel" name="jLabel3">
91+
<Properties>
92+
<Property name="text" type="java.lang.String" value="&#x5bc6;&#x7801;:"/>
93+
</Properties>
94+
</Component>
95+
<Component class="javax.swing.JTextField" name="jtfUsername">
96+
</Component>
97+
<Component class="javax.swing.JPasswordField" name="jpfPassword">
98+
</Component>
99+
<Component class="javax.swing.JButton" name="loginButton">
100+
<Properties>
101+
<Property name="text" type="java.lang.String" value="&#x767b;&#x5f55;"/>
102+
</Properties>
103+
<Events>
104+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="loginButtonActionPerformed"/>
105+
</Events>
106+
</Component>
107+
<Component class="javax.swing.JButton" name="resetButton">
108+
<Properties>
109+
<Property name="text" type="java.lang.String" value="&#x91cd;&#x7f6e;"/>
110+
</Properties>
111+
<Events>
112+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="resetButtonActionPerformed"/>
113+
</Events>
114+
</Component>
115+
<Component class="javax.swing.JButton" name="registButton">
116+
<Properties>
117+
<Property name="text" type="java.lang.String" value="&#x6ce8;&#x518c;"/>
118+
</Properties>
119+
<Events>
120+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="registButtonActionPerformed"/>
121+
</Events>
122+
</Component>
123+
</SubComponents>
124+
</Form>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
4+
<NonVisualComponents>
5+
<Component class="javax.swing.JLabel" name="jLabel2">
6+
<Properties>
7+
<Property name="text" type="java.lang.String" value="jLabel2"/>
8+
</Properties>
9+
</Component>
10+
</NonVisualComponents>
11+
<Properties>
12+
<Property name="defaultCloseOperation" type="int" value="3"/>
13+
</Properties>
14+
<SyntheticProperties>
15+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
16+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
17+
</SyntheticProperties>
18+
<AuxValues>
19+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
20+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
21+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
22+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
23+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
24+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
25+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
26+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
27+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
28+
</AuxValues>
29+
30+
<Layout>
31+
<DimensionLayout dim="0">
32+
<Group type="103" groupAlignment="0" attributes="0">
33+
<Group type="102" alignment="0" attributes="0">
34+
<EmptySpace min="-2" pref="48" max="-2" attributes="0"/>
35+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
36+
<Group type="102" attributes="0">
37+
<Component id="registButton" min="-2" max="-2" attributes="0"/>
38+
<EmptySpace pref="124" max="32767" attributes="0"/>
39+
<Component id="cancleButton" min="-2" max="-2" attributes="0"/>
40+
</Group>
41+
<Group type="102" attributes="0">
42+
<Group type="103" groupAlignment="0" attributes="0">
43+
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
44+
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
45+
</Group>
46+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
47+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
48+
<Component id="jtfUsername" max="32767" attributes="0"/>
49+
<Component id="jpfPassword" pref="190" max="32767" attributes="0"/>
50+
</Group>
51+
</Group>
52+
</Group>
53+
<EmptySpace pref="79" max="32767" attributes="0"/>
54+
</Group>
55+
</Group>
56+
</DimensionLayout>
57+
<DimensionLayout dim="1">
58+
<Group type="103" groupAlignment="0" attributes="0">
59+
<Group type="102" alignment="0" attributes="0">
60+
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
61+
<Group type="103" groupAlignment="3" attributes="0">
62+
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
63+
<Component id="jtfUsername" alignment="3" min="-2" max="-2" attributes="0"/>
64+
</Group>
65+
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
66+
<Group type="103" groupAlignment="3" attributes="0">
67+
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
68+
<Component id="jpfPassword" alignment="3" min="-2" max="-2" attributes="0"/>
69+
</Group>
70+
<EmptySpace min="-2" pref="59" max="-2" attributes="0"/>
71+
<Group type="103" groupAlignment="3" attributes="0">
72+
<Component id="registButton" alignment="3" min="-2" max="-2" attributes="0"/>
73+
<Component id="cancleButton" alignment="3" min="-2" max="-2" attributes="0"/>
74+
</Group>
75+
<EmptySpace pref="77" max="32767" attributes="0"/>
76+
</Group>
77+
</Group>
78+
</DimensionLayout>
79+
</Layout>
80+
<SubComponents>
81+
<Component class="javax.swing.JLabel" name="jLabel1">
82+
<Properties>
83+
<Property name="text" type="java.lang.String" value="&#x7528;&#x6237;&#x540d;:"/>
84+
</Properties>
85+
</Component>
86+
<Component class="javax.swing.JLabel" name="jLabel3">
87+
<Properties>
88+
<Property name="text" type="java.lang.String" value="&#x5bc6;&#x7801;:"/>
89+
</Properties>
90+
</Component>
91+
<Component class="javax.swing.JTextField" name="jtfUsername">
92+
</Component>
93+
<Component class="javax.swing.JPasswordField" name="jpfPassword">
94+
</Component>
95+
<Component class="javax.swing.JButton" name="registButton">
96+
<Properties>
97+
<Property name="text" type="java.lang.String" value="&#x6ce8;&#x518c;"/>
98+
</Properties>
99+
<Events>
100+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="registButtonActionPerformed"/>
101+
</Events>
102+
</Component>
103+
<Component class="javax.swing.JButton" name="cancleButton">
104+
<Properties>
105+
<Property name="text" type="java.lang.String" value="&#x53d6;&#x6d88;"/>
106+
</Properties>
107+
<Events>
108+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancleButtonActionPerformed"/>
109+
</Events>
110+
</Component>
111+
</SubComponents>
112+
</Form>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
登录注册:
2+
3+
有哪些类?
4+
用户类
5+
用户描述类
6+
用户操作类
7+
登录窗体
8+
注册窗体
9+
类有哪些成员?
10+
用户类
11+
用户描述类
12+
用户名,密码
13+
用户操作类
14+
登录,注册
15+
类与类的关系?
16+
在登录窗体上点击登录按钮,调用登录功能
17+
在注册窗体上点击注册按钮,调用注册功能
18+
19+
20+
分包:
21+
cn.itcast.pojo 用户基本描述类
22+
cn.itcast.dao 用户操作接口
23+
cn.itcast.dao.impl 用户操作具体实现类
24+
cn.itcast.util 工具类
25+
cn.itcast.view 窗体类
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
count=5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
7+
package cn.itcast.dao;
8+
9+
import cn.itcast.pojo.User;
10+
11+
/**
12+
*
13+
* @author fqy
14+
*/
15+
public interface UserDao {
16+
public abstract boolean isLogin(String username,String password);
17+
public abstract void regist(User user);
18+
}

0 commit comments

Comments
 (0)