public Configuration(User user) {
		this(new javax.swing.JFrame(), true);//ԭʼ췽
		try {
			UserAction.regin(userlist);
		} catch (IOException e1) {
			JOptionPane.showConfirmDialog(null, "ȡûϢʧ", "",
					JOptionPane.OK_OPTION);
			e1.printStackTrace();
		}
		if ("".equals(user.getUsername())) {
			if (userlist.size() != 0) {
				this.user = userlist.get(0);
			} else {
				this.user = user;
			}
		} else {
			userlist.remove(userlist.indexOf(user));
			userlist.add(0, user);
			this.user = user;
		}

		if (userlist.size() != 0) {

			for (Iterator<User> it = userlist.iterator(); it.hasNext();) {
				lm.addElement(it.next().getUsername());
			}
		}

		initComponents();
		userList.setModel(lm);
		//		usernameTextField.setText("thz1987");
		//		passwordTextField.setText("leaddowuhan");
		usernameTextField.setText(user.getUsername());
		passwordTextField.setText(user.getPassword());
		for (int i = 0; i < smtpComboBox.getItemCount(); i++) {
			if (user.getSmtpServer().equals(smtpComboBox.getItemAt(i))) {
				smtpComboBox.setSelectedIndex(i);
				break;
			}
		}
		for (int i = 0; i < popComboBox.getItemCount(); i++) {
			if (user.getPopServer().equals(popComboBox.getItemAt(i))) {
				popComboBox.setSelectedIndex(i);
				break;
			}
		}

		addWindowListener(new java.awt.event.WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				dispose();
			}
		});

		setLocation(320, 220);
		setVisible(true);
	}