private void initialize() {
		this.addWindowListener(new WindowAdapter() {
			
			@Override
			public void windowActivated(WindowEvent e) {
				super.windowActivated(e);
				Log.logfile("", new Date(Calendar.getInstance().getTimeInMillis()));
			}

			@Override
			public void windowClosing(WindowEvent e) {
				super.windowClosing(e);
				try {
//					int nRet = JOptionPane.showConfirmDialog(null, "Are you sure to exit ?", "Exit confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
//					if (nRet == JOptionPane.YES_OPTION) {
						if (getCurrentState() == STATE_BOARD) {
							sessionComm.send(new Package(boardPanel.getBoardNumber(), sessionComm.getUsername(), PackageKind.ACTION_BOARD_LEAVE));
						}
						if (sessionComm != null && sessionComm.isRunning()) {
							sessionComm.send(new Package(null, PackageKind.ACTION_LOGOUT));
							sessionComm.stopRun();
						}
//					} else {
//					}

				} catch (Exception e2) {
					Log.logfile(e2.getMessage(), new Date(Calendar.getInstance().getTimeInMillis()));
					e2.printStackTrace();
				}
			}
		});
		menuFile.add(menuFileLogout);
		menuFile.add(menuFileExit);
		
		menuHelp.add(menuHelpAbout);
		
		menubar.add(menuFile);
		menubar.add(menuHelp);
		
		menuFileLogout.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				try {
					int nAns = JOptionPane.showConfirmDialog(null, "Are you sure logout ?", "Logout confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
					if (nAns == JOptionPane.OK_OPTION) {
						if (sessionComm != null && sessionComm.isRunning()) {
							sessionComm.send(new Package(null, PackageKind.ACTION_LOGOUT));
						}
					}
				} catch (Exception e) {
					e.printStackTrace();
					Log.logfile(e.getMessage(), new Date(Calendar.getInstance().getTimeInMillis()));  
				}
			}
		});
		
		this.setJMenuBar(menubar);
		updateUI();
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
	}