String text = view.getTextArea().getSelectedText();
String text = textArea.getSelectedText();
	public void actionPerformed(ActionEvent evt)	{		View view = getView(evt);		Buffer buffer = view.getBuffer();		if(!buffer.isEditable())		{			view.getToolkit().beep();			return;		}		int maxLineLength = ((Integer)buffer.getProperty("maxLineLen"))			.intValue();		String text = view.getTextArea().getSelectedText();		if(text != null)			view.getTextArea().setSelectedText(doFormat(text,				maxLineLength));		else		{			try			{				text = buffer.getText(0,buffer.getLength());				buffer.remove(0,buffer.getLength());				buffer.insertString(0,doFormat(text,					maxLineLength),null);			}			catch(BadLocationException bl)			{				return;			}		}	}