File tree 6 files changed +11
-6
lines changed
6 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 152
152
</Component >
153
153
<Component class =" javax.swing.JLabel" name =" jLabel3" >
154
154
<Properties >
155
- <Property name =" font" type =" java.awt.Font" editor =" org.netbeans.beaninfo.editors.FontEditor" >
156
- <Font name =" Segoe UI" size =" 12" style =" 0" />
157
- </Property >
158
155
<Property name =" text" type =" java.lang.String" value =" Đị a chỉ " />
159
156
</Properties >
160
157
</Component >
Original file line number Diff line number Diff line change 152
152
</Component >
153
153
<Component class =" javax.swing.JLabel" name =" jLabel3" >
154
154
<Properties >
155
- <Property name =" font" type =" java.awt.Font" editor =" org.netbeans.beaninfo.editors.FontEditor" >
156
- <Font name =" Segoe UI" size =" 12" style =" 0" />
157
- </Property >
158
155
<Property name =" text" type =" java.lang.String" value =" Đị a chỉ " />
159
156
</Properties >
160
157
</Component >
Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ else if (cbbRole.getSelectedItem().equals("Thường"))
214
214
ObjectOutputStream out = new ObjectOutputStream (fileOut );
215
215
out .writeObject (username );
216
216
out .writeObject (password );
217
+ // Luu trang thai checkbox
218
+ out .writeObject ("check" );
219
+ // Luu trang thai combobox
220
+ out .writeObject (cbbRole .getModel ().getSelectedItem ().toString ());
217
221
out .close ();
218
222
fileOut .close ();
219
223
} catch (IOException i ) {
@@ -227,6 +231,8 @@ else if(ckbRemeberMe.isSelected()==false)
227
231
ObjectOutputStream out = new ObjectOutputStream (fileOut );
228
232
out .writeObject ("" );
229
233
out .writeObject ("" );
234
+ out .writeObject ("" );
235
+ out .writeObject ("" );
230
236
out .close ();
231
237
fileOut .close ();
232
238
} catch (IOException i ) {
@@ -300,6 +306,11 @@ private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event
300
306
301
307
txtUsername .setText ((String ) in .readObject ());
302
308
txtPassword .setText ((String ) in .readObject ());
309
+ if (in .readObject ().toString ().equalsIgnoreCase ("check" )) {
310
+ ckbRemeberMe .setSelected (true );
311
+ }
312
+ cbbRole .getModel ().setSelectedItem (in .readObject ());
313
+
303
314
in .close ();
304
315
fileIn .close ();
305
316
You can’t perform that action at this time.
0 commit comments