jfs.setSelectedFile(new File("mail.html"));
jfs.setSelectedFile(new File("mail.txt"));
		public void actionPerformed(ActionEvent ae) {			String kommando = ((JMenuItem)ae.getSource()).getText();			if (kommando.equals(YAMM.getString("file.exit"))) {				YAMM.getInstance().exit();			} else if (kommando.equals(YAMM.getString("help.about_you"))) {				String host = null;				String ipaddress = null;				try {					InetAddress myInetaddr = InetAddress.getLocalHost();					ipaddress = myInetaddr.getHostAddress();					host = myInetaddr.getHostName();				} catch (UnknownHostException uhe) {}				if (ipaddress == null) {					ipaddress = YAMM.getString("unknown");				}				if (host == null) {					host = YAMM.getString("unknown");				}				Object[] args = {					System.getProperty("os.name"),					System.getProperty("os.version"),					System.getProperty("os.arch"),					ipaddress,					host,					System.getProperty("java.version"),					System.getProperty("java.vendor"),					System.getProperty("java.vendor.url"),					System.getProperty("user.name"),					System.getProperty("user.home"),					YAMM.getProperty("stat.sentnum", "0"),					YAMM.getProperty("stat.receivednum", "0"),					format(YAMM.getProperty("stat.sentbytes", "0")),					format(YAMM.getProperty("stat.receivedbytes", "0")),				};				JOptionPane.showMessageDialog(					YAMM.getInstance(),					YAMM.getString("info.about.you", args),					YAMM.getString("help.about_you"),					JOptionPane.INFORMATION_MESSAGE				);			} else if (kommando.equals(YAMM.getString("help.about"))) {				Object[] args = {					YAMM.version,					YAMM.compDate,					"http://www.gjt.org/~fredde/yamm/",					"<fredde@gjt.org>"				};				JOptionPane.showMessageDialog(					YAMM.getInstance(),					"Copyright (C) 1999-2003 Fredrik Ehnbom\n" +					YAMM.getString("info.about", args) + "\n" + 					"Tuomas Kuosmanen\n" +					"Rafael Escovar\n" + 					"Ricardo A Mattar\n" + 					"Daniel Johnson\n" +					"Pablo Rodriguez\n" +					"Ilane Marie Walberg",					YAMM.getString("help.about"),					JOptionPane.INFORMATION_MESSAGE				);			} else if (kommando.equals(YAMM.getString("help.bug_report"))) {				YAMMWrite yw = new YAMMWrite("\"Fredrik Ehnbom\" <fredde@gjt.org>", "Bug report");				JTextArea jt = yw.myTextArea;				jt.append("What is the problem?\n\n");				jt.append("How did you make it happen?\n\n");				jt.append("Can you make it happen again?\n\n");				jt.append("\nAnd now some info about your system:\n");				p("java.version", jt);				p("java.vendor", jt);				p("java.vendor.url", jt);				p("java.home", jt);				p("java.vm.specification.version", jt);				p("java.vm.specification.vendor", jt);				p("java.vm.specification.name", jt);				p("java.vm.version", jt);				p("java.vm.vendor", jt);				p("java.vm.name", jt);				p("java.specification.version", jt);				p("java.specification.vendor", jt);				p("java.specification.name", jt);				p("java.class.version", jt);				p("java.class.path", jt);				p("os.name", jt);				p("os.arch", jt);				p("os.version", jt);				jt.append("YAMM.version: " + YAMM.version + "\n");				jt.append("YAMM.compDate: " + YAMM.compDate);			} else if (kommando.equals(YAMM.getString("help.license"))) {				JOptionPane.showMessageDialog(					YAMM.getInstance(),					"Yet Another Mail Manager " +					YAMM.version + " E-Mail Client\n" +					"Copyright (C) 1999-2003 Fredrik Ehnbom\n" +					YAMM.getString("license"),					YAMM.getString("help.license"),					JOptionPane.INFORMATION_MESSAGE				);			}  else if (kommando.equals(YAMM.getString("edit.settings"))) {				new ConfigurationWizard(YAMM.getInstance());			} else if (kommando.equals(YAMM.getString("menu.message.new"))) {				new YAMMWrite();			} else if (kommando.equals(YAMM.getString("menu.message.reply"))) {				YAMMWrite yam = new YAMMWrite();				yam.reply();			} else if (kommando.equals(YAMM.getString("menu.message.forward"))) {				YAMMWrite yam = new YAMMWrite();				yam.forward();			} else if (kommando.equals(YAMM.getString("menu.message.delete"))) {				YAMM yamm = YAMM.getInstance();				yamm.mailList.deleteSelected();			} else if (kommando.equals(YAMM.getString("menu.message.view_source"))) {				YAMM yamm = YAMM.getInstance();				mainTable tmp = yamm.mailList;				int test = tmp.getSelectedRow();				if (test >= 0 && test < yamm.listOfMails.length) {					int msg = tmp.getSelectedMessage();					long skip = yamm.listOfMails[msg].skip;					if (msg != -1) {						sourceViewer sv = new sourceViewer();						int ret = Mailbox.viewSource(							yamm.getMailbox(), msg,							sv.jtarea						);						if (ret != -1) {							JScrollBar jsb = sv.jsp.getVerticalScrollBar();							jsb.updateUI();							jsb.setValue(0);						} else {							sv.dispose();							sv = null;						}					}				}			} else if (kommando.equals(YAMM.getString("menu.message.save_as"))) {				YAMM yamm = YAMM.getInstance();				int test = yamm.mailList.getSelectedMessage();				if (test != -1 && test <= yamm.listOfMails.length) {					JFileChooser jfs = new JFileChooser();					jfs.setFileSelectionMode(JFileChooser.FILES_ONLY);					jfs.setMultiSelectionEnabled(false);					jfs.setFileFilter(new filter());					jfs.setSelectedFile(new File("mail.html"));					int ret = jfs.showSaveDialog(yamm);					if (ret == JFileChooser.APPROVE_OPTION) {						String tmp = yamm.getMailbox();						String boxName = tmp.substring(							tmp.indexOf("boxes") +							6,							tmp.length()						);						tmp = yamm.mailPageString;						boxName = tmp.substring(8,							tmp.length()) +							boxName + File.separator +							yamm.mailList.							getSelectedMessage() +							".html";						new File(boxName).renameTo(							jfs.getSelectedFile()						);					}				}			} else if (kommando.equals(YAMM.getString("file.empty_trash"))) {				YAMM yamm = YAMM.getInstance();				String trash = Utilities.replace(yamm.home + "/boxes/trash");				new File(trash).delete();				new File(Mailbox.getIndexName(trash)).delete();				try {					new File(trash).createNewFile();				} catch (IOException e) {					new ExceptionDialog(						YAMM.getString("msg.error"),						e,						YAMM.exceptionNames					);				}				yamm.tree.unreadTable.put(trash, new int[] {0,0,0});				yamm.tree.fullUpdate();				if (yamm.getMailbox().equals(trash)) {					yamm.setMailbox(trash);				}				yamm.mailList.update();			}		}