public void setTray() {

		if (SystemTray.isSupported()) {// жϵǰƽ̨Ƿ֧̹
			// ʵ
			SystemTray tray = SystemTray.getSystemTray();
			// ͼ꣺1.ʾͼImage 2.ͣʾtext 3.˵popupMenu 4.ͼʵ
			// 1.Imageͼ
			Image image = Toolkit.getDefaultToolkit().getImage(
					getClass().getResource("/trayIconImage/clientIcon.gif"));
			// 2.ͣʾtext
			String text = "¼";
			// 3.˵popupMenu
			PopupMenu popMenu = new PopupMenu();
			MenuItem itmOpen = new MenuItem("");
			itmOpen.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					Show();
				}
			});
			MenuItem itmHide = new MenuItem("");
			itmHide.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					UnVisible();
				}
			});
			MenuItem itmExit = new MenuItem("˳");
			itmExit.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					Exit();
				}
			});
			MenuItem itmEdit = new MenuItem("༭");
			itmEdit.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					Edit();
				}
			});
			popMenu.add(itmOpen);
			popMenu.add(itmHide);
			popMenu.add(itmEdit);
			popMenu.add(itmExit);

			// ͼ
			TrayIcon trayIcon = new TrayIcon(image, text, popMenu);
			// ͼӵ
			try {
				tray.add(trayIcon);
			} catch (AWTException e1) {
				e1.printStackTrace();
			}
		}
	}