public void cut(SimpleFrame panelText)
	{
		panelText.setAction(false);
		int cp;
		if (panelText.getText().getSelectedText() != null)
		{
			copy(panelText);
			cp = panelText.getText().getSelectionStart();
			try 
			{
				String text = panelText.getText().getSelectedText();
				int position = panelText.getText().getSelectionStart();
				ActionsHistoryImpl.action type = ActionsHistoryImpl.action.SUB;
				ActionData data = new ActionData(panelText.getText().getCaretPosition(),panelText.getText().getText(), false);
				String login = panelText.getLogin();
				data = panelText.getList().newPutString(text, position, type, data, login);
				panelText.getText().setText(data.getPanelText());
				panelText.getText().setCaretPosition(data.getCaretPosition());
				panelText.setIsChanged(data.getChanged());
			} 
			catch (RemoteException e) 
			{
				JOptionPane.showMessageDialog(panelText, "Disconnect from server");
			}
			if(panelText.getText().getSelectionStart() == 0)
			{
				int begin = panelText.getText().getSelectedText().length();
				int finish = panelText.getText().getText().length();
				String text = panelText.getText().getText().substring(begin, finish);
				panelText.getText().setText(text);
				panelText.getText().setCaretPosition(cp);
				return;
			}
			if(panelText.getText().getSelectionStart() > 0 && panelText.getText().getSelectionStart() < panelText.getText().getText().length())
			{
				int begin1 = 0;
				int finish1 = panelText.getText().getSelectionStart();
				String text1 = panelText.getText().getText().substring(begin1, finish1); 
				int begin2 = panelText.getText().getSelectionStart() + panelText.getText().getSelectedText().length();
				int finish2 = panelText.getText().getText().length();
				String text2 = panelText.getText().getText().substring(begin2, finish2);
				panelText.getText().setText(text1 + text2);
				panelText.getText().setCaretPosition(cp);
				return;
			}
			if(panelText.getText().getSelectionStart() == panelText.getText().getText().length())
			{
				int begin = 0;
				int finish = panelText.getText().getSelectionStart();
				String text = panelText.getText().getText().substring(begin, finish);
				panelText.getText().setText(text);
				panelText.getText().setCaretPosition(cp);
				return;
			}
		}
		panelText.setAction(true);
	}