@Override
	public void actionPerformed(ActionEvent e) {
		String id = JOptionPane.showInputDialog("Skriv personnummer:");
		if(bgm.findUser(id) != null) {
			JOptionPane.showMessageDialog(null, "Det finns redan en ägare med det personnummret!");
			return;
		} else if(id == null) {
			return;
		}
		String name = JOptionPane.showInputDialog("Skriv namn:");
		if(name == null) {
			return;
		}
		String email = JOptionPane.showInputDialog("Skriv email:");
		if(email == null) {
			return;
		}
		String phone = JOptionPane.showInputDialog("Skriv telefonnummer:");
		if(phone == null) {
			return;
		}
		String address = JOptionPane.showInputDialog("Skriv adress:");
		if(address == null) {
			return;
		}
		User user = new User(name, id, email, phone, address);

		bgm.generateNewPIN(user);
		bgm.registerUser(user);
		messageArea.setText("Information" + "\n");
		messageArea
				.append("--------------------------------------------------------------------"
						+ "\n");
		messageArea.append("Namn: " + name + "\n");
		messageArea.append("Personnummer: " + id + "\n");
		messageArea.append("Email: " + email + "\n");
		messageArea.append("Telefon: " + phone + "\n");
		messageArea.append("Adress: " + address + "\n");
		messageArea.append("PIN: " + user.getPIN());

	}