public void delete() {
		StringBuffer s = new StringBuffer(program.getMainPanel().getTextField()
				.getText());
		int begin = program
				.getMainPanel()
				.getTextField()
				.getText()
				.indexOf(
						program.getMainPanel().getTextField().getSelectedText());
		int end = begin
				+ program.getMainPanel().getTextField().getSelectedText()
						.length();
		s.delete(begin, end);
		program.getMainPanel().getTextField().setText(s.toString());
	}