public void actionPerformed(ActionEvent arg0) {

				JOptionPane pane = new JOptionPane(
						"Save your document before starting new one?");
				Object[] options = new String[] { "Yes", "No" };
				pane.setOptions(options);
				JDialog dialog = pane.createDialog(new JFrame(),
						"Save your document");
				dialog.show();
				Object obj = pane.getValue();
				if (obj.toString().equals("Yes")) {

					SaveAs save = new SaveAs();
					save.saveAs(textArea);
					textArea.setText(null);
					refresh rf = new refresh();
					String t = rf.refStats(textArea);
					st.setText(t);

				} else {
					textArea.setText(null);
					refresh rf = new refresh();
					String t = rf.refStats(textArea);
					st.setText(t);
				}

			}