From 0c7d0be644dae8da689a92a1b0aa5b4acd75ac3f Mon Sep 17 00:00:00 2001 From: Zhang Haoran Date: Wed, 15 Apr 2015 18:03:44 +0800 Subject: [PATCH] Finished basic modules Basic modules finished, some small bugs to fix. --- .idea/workspace.xml | 182 ++++++++++++------ .../com/bistuSMS/SMSAddStudent$1.class | Bin 710 -> 751 bytes .../com/bistuSMS/SMSAddStudent.class | Bin 3260 -> 3478 bytes .../com/bistuSMS/SMSMainWindow$1.class | Bin 2483 -> 2434 bytes .../com/bistuSMS/SMSMainWindow$2.class | Bin 1166 -> 1118 bytes .../com/bistuSMS/SMSMainWindow$3.class | Bin 798 -> 798 bytes .../com/bistuSMS/SMSMainWindow$4.class | Bin 712 -> 976 bytes .../com/bistuSMS/SMSMainWindow.class | Bin 2920 -> 3021 bytes .../com/bistuSMS/SMSWelcomeWindow.class | Bin 2522 -> 2523 bytes src/com/bistuSMS/SMSAddStudent.java | 4 +- src/com/bistuSMS/SMSMainWindow.java | 15 +- src/com/bistuSMS/SMSWelcomeWindow.java | 2 +- 12 files changed, 133 insertions(+), 70 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 968dfb0..0bae708 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -27,19 +27,40 @@ - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + - + + @@ -64,14 +85,14 @@ @@ -109,6 +130,7 @@ + @@ -147,9 +169,8 @@ - - + @@ -448,41 +469,43 @@ - + + + - - + + + - + + - - - @@ -508,21 +531,68 @@ - + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -543,7 +613,6 @@ - @@ -551,7 +620,6 @@ - @@ -567,7 +635,6 @@ - @@ -602,7 +669,6 @@ - @@ -610,7 +676,6 @@ - @@ -626,7 +691,6 @@ - @@ -661,7 +725,6 @@ - @@ -677,7 +740,6 @@ - @@ -699,53 +761,38 @@ - - - - - - - - - - - - - + - - + - + - - + - + - - + - + @@ -753,34 +800,41 @@ - - + - + + + + + + + + - - + + + + + - + - + - + - - - - - + + + diff --git a/out/production/Student-Management-System/com/bistuSMS/SMSAddStudent$1.class b/out/production/Student-Management-System/com/bistuSMS/SMSAddStudent$1.class index 62ef69094bda10cd608e3463ab8156fe21224265..ee7f7afeba92a3ef618230010e33d701fefbcfce 100644 GIT binary patch delta 130 zcmX@c`kqz()W2Q(7#J8#7*shKSQsR^7+4vkxEQ1vWY`&G*%{cnN<0k83@VHaG81*ACQo8?P*T+JNzTvJPs%JVDGl}w)(7I?lG2payb{Nv eqQpvT&9KQA7_%7NCtEYQv3de+@|xVn6)W2Q(7#J8#7?e2~SQsR^7+4u3xEQ1uq}dr{*coIu$~!X(%keO9Fv#;T nuraW+Gbr#dC^9Hbu40Ux{F^a@(RFePlN+l$P_M`2^-K-`l*A8H diff --git a/out/production/Student-Management-System/com/bistuSMS/SMSAddStudent.class b/out/production/Student-Management-System/com/bistuSMS/SMSAddStudent.class index 6e99abc180a7b9d5d694329fd0f06ae405770e78..85629e539a1d6a4cf7db1c3e77df370391d9a6f1 100644 GIT binary patch delta 1736 zcmZ8hYfzL`7=F&)zUAX<3^4>;k>w_Q7|RNZa!W)-4aCGCh?12hTEZn^5$LvJH?j=t zGcvP#LTXS3ECz&T7oBGM)l5H{W}2qJsb=a={b*{M-uJLHOgnR)=Xu}noU`XW&pBs0 zZeT_5i+?6(0OaDTiXyZqxKD)%tq~~10R}%q8^iqy4%*SK!j2A(19o&WAF`v1x!aB& z<_GL}koh4658LsGie>ZtgLWL|e6NBdD&oY3NreIL?zi$BJMXo@Zq!IKlja9RtiSDmbaajh8q$#qcu2X%(;FRRyo94l4F_ z6?u4r=YLbhTXvjt2!GSo0_}= zqE0~T^7*}OU8SvU9h|Zi`ux5?v4At3$Jyq`87EDbj1%T0TRq+ph%wwECQd^=&T80% z5)GRfN*T7G#Q4RWQC^R88n$AaK*a2jF?;;jZ_}qVl*z>0;i1{S^D?nrCa(7nU!NS3 zi5>Gph6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4oXqxpalD6I%(mCgPW*!7mR`Ugo7E(I+zog7r7;JTXrpo+!0wsMnn0={qS>h z&3$Qp%jyLM!UNb7&Jx&cVMM?_f8t+4>_J9dB2STwe=sQ`MuNjz&N+^`WFa~)j4K+R>?g4ab@6NWIow~oX z7Kgo~Q!tgmi1h)1v{4uwO1n>jCD}h|bmXKF@zaRl2%_rLI>bnjy0mdF$r^=$H+vFD z=0FS|Vt9~x6)j0Lpivpi09_nNmG!@>(XC)ryH9n<%wx?HIL5Oz{ur$u{VO>E($hjO-+|q3R=nc8 zpG_{wLn>Ow*2*i`UMIDZ-oE= diff --git a/out/production/Student-Management-System/com/bistuSMS/SMSMainWindow$2.class b/out/production/Student-Management-System/com/bistuSMS/SMSMainWindow$2.class index 9d737e637b1df6cf2014ee8aaf69661a10fabc4f..a0b0cfbaa619faa97bd1bb9d33b6a2592044e47b 100644 GIT binary patch delta 441 zcmX|-*-ipM5JgYVAj1qT;)VjF;I6DL2nvb`?|zH#ZfJZrnegOiXcQAoNPP7dG<=CM zRwJQ1U43umR^3Y7yZuPx^Y^U>R5)>QS@G~#by;G~W1S5XHVxhK$dNa+;81iZIh2F5 zJu9;rT=+r%Tctbis#@FD#Msej#tqul>``&p*Ho!#4ov2dxJF(hpzF8ToC z4Jw|&JrQdUG09$Q{j>k||7&Nxhwj3=FW=8?pu|p?FtaAiMTn3IGsAp@1zZ!d5ppb= zDsNM;S+XfAoU_B@wD)Qi>eZsE)=!dN$C{|$zNw^lq{@|Ljl+tjmzYM=V_-?MO4+8O zSz}$ZLCI!Qvqe?2O-YfcpN@GSs^fiH`!&mPOeaVd8JX0QG7d9eN(bBk delta 27 icmbQoHjiyX6BA?ed9d?g!KW diff --git a/out/production/Student-Management-System/com/bistuSMS/SMSMainWindow$4.class b/out/production/Student-Management-System/com/bistuSMS/SMSMainWindow$4.class index cc00343e4dedb54bc05ec9bd7a15976b0bb1594c..937fe16f3fb863febd12a0b265758fa3f53ab429 100644 GIT binary patch delta 511 zcmaK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YPG*Jyfm}E{ont6Kl?l9yG2(Q#=iac zi?4thE?TUn&E&}d?G^?d^SFl{0Xj846`)IFx5?81dMqqbiAAjrGZ;5H zY*9zt#IdL+t_w|=ylHa8395~%&55eNo#Vz~r`xD>cKQl?n>nh;?v4ybhAaAqx_Ub+ z8rBR%qkX-K)GO0d*CzJbG!wR2%Q`Xrdho=xW2bEH)yx-ZZ?{>m)%m(YMPw*ivA(Z2 zsxa4e?1&8XM0N68Hutf?=6*KB{nfWLuu+lqzm8iXZ9N?}o7n6$`WN{cX>z*#xq*jx z*k+56F)@=lhJ3pk@={CoC+vXkKwRw;ComqcX)d?o0?Db2BuADu2_43#+Uta!g zV(R*(eKsfgz~%uSv^m9xHeH;y`G_g0w&dn2J>bVSXZXbCtag9OXEx`gXj4jo?>rZD zSZcKn``lA&Y^IrUeom?J`+}w6>9o{z9?D8Rl(l&%oAXds=buT_{4hN`7tmWOOV$(OaA7Naw!O9`tmc4tuBR{7KIWNw72p_v%-U8+T2thq~#Rx_-O#!Ta%Of~Lu`kV+H%UwDqQA=HGXqLN^d|rZjO;>8F>v+BVE~_rc9u2mN zJR)B#6gd-CS*(~*VR4pnlx0j3(&$q;>{20is}=OC zRYX+-18O^is*@qr&#)R{M8z3ZlZ>k~#ML<*TBTop^2*r8c42aPJi?;M1& delta 54 zcmcaDd`oykFSDjbKz?~@QEG}pQl)}Nse)6!jzR>8Qb^28QHaV&%u84BNX#!v%-g)3 HS%nP%2P_g% diff --git a/src/com/bistuSMS/SMSAddStudent.java b/src/com/bistuSMS/SMSAddStudent.java index c6f111e..51060f6 100644 --- a/src/com/bistuSMS/SMSAddStudent.java +++ b/src/com/bistuSMS/SMSAddStudent.java @@ -30,10 +30,11 @@ public class SMSAddStudent extends JFrame implements ActionListener { public JPanel panel5 = new JPanel(); public JPanel panel6 = new JPanel(); public SMSStudent addStudent; + public SMSStudentArray stuArray = SMSMainWindow.getStuArray(); public boolean addSucceed = false; public boolean windowClosed = false; - public SMSAddStudent() { + public SMSAddStudent(SMSStudentArray stuArray) { this.setLayout(new GridLayout(6, 1)); panel1.add(titleLabel); @@ -80,6 +81,7 @@ public void windowClosing(WindowEvent e) { public void actionPerformed(ActionEvent a) { if (a.getSource() == addBtn) { addStudent = new SMSStudent(stuNameTextField.getText(), stuSexTextField.getText(), stuClassTextField.getText(), stuNumberTextField.getText()); + stuArray.addStudent(addStudent); addSucceed = true; windowClosed = true; this.setVisible(false); diff --git a/src/com/bistuSMS/SMSMainWindow.java b/src/com/bistuSMS/SMSMainWindow.java index 8152eeb..300017d 100644 --- a/src/com/bistuSMS/SMSMainWindow.java +++ b/src/com/bistuSMS/SMSMainWindow.java @@ -19,7 +19,7 @@ public class SMSMainWindow extends JFrame{ JButton returnButton = new JButton("注销"); JButton removeButton = new JButton("删除"); - JButton addbutton = new JButton("add"); + JButton addButton = new JButton("添加"); Font font = new Font("Default",Font.PLAIN,20); Font titleFont = new Font("Default",Font.PLAIN,25); @@ -32,9 +32,10 @@ public class SMSMainWindow extends JFrame{ JScrollPane panel2 = new JScrollPane(); JPanel panel3 = new JPanel(); + public static SMSStudentArray studentArray = new SMSStudentArray(); + public SMSMainWindow (String user){ this.setTitle("学生管理系统"); - SMSStudentArray studentArray = new SMSStudentArray(); setLayout(null); this.setSize(800, 600); this.setLocationRelativeTo(null); @@ -117,6 +118,7 @@ public void removeTableModelListener(TableModelListener l) { panel3.setBounds(10, 500, 760, 100); panel3.add(returnButton); panel3.add(removeButton); + panel3.add(addButton); removeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -135,14 +137,19 @@ public void actionPerformed(ActionEvent e) { setVisible(false); } }); - addbutton.addActionListener(new ActionListener() { + addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { -// new SMSAddStudent(); + new SMSAddStudent(studentArray); + studentListTable.revalidate(); } }); add(panel3); this.setVisible(true); } + + public static SMSStudentArray getStuArray() { + return studentArray; + } } diff --git a/src/com/bistuSMS/SMSWelcomeWindow.java b/src/com/bistuSMS/SMSWelcomeWindow.java index b0027a9..fed47df 100644 --- a/src/com/bistuSMS/SMSWelcomeWindow.java +++ b/src/com/bistuSMS/SMSWelcomeWindow.java @@ -30,7 +30,7 @@ public SMSWelcomeWindow() { SMSSMSLabel.setFont(SMSFontMonaco); SMSWelcomeLogin = new JButton("进入系统"); SMSWelcomeQuit = new JButton("退出系统"); - SMSWelcomeMembers = new JLabel("Powered by Hu Bo, Xu Bo and Zhang Haoran"); + SMSWelcomeMembers = new JLabel("Powered by Xu Bo, Zhang Haoran, Zhang Zhu"); SMSWelcomeMembers.setFont(new Font("Default",Font.PLAIN,13)); SMSWelcomePanel = new JPanel[4];