setEditPane(createEditPane(oldEditPane,null));
setEditPane(createEditPane(oldEditPane.getBuffer()));
	public void split(int orientation)	{		editPane.saveCaretInfo();		EditPane oldEditPane = editPane;		setEditPane(createEditPane(oldEditPane,null));		editPane.loadCaretInfo();		JComponent oldParent = (JComponent)oldEditPane.getParent();		if(oldParent instanceof JSplitPane)		{			JSplitPane oldSplitPane = (JSplitPane)oldParent;			int dividerPos = oldSplitPane.getDividerLocation();			Component left = oldSplitPane.getLeftComponent();			final JSplitPane newSplitPane = new JSplitPane(orientation,				oldEditPane,editPane);			newSplitPane.setBorder(null);			if(left == oldEditPane)				oldSplitPane.setLeftComponent(newSplitPane);			else				oldSplitPane.setRightComponent(newSplitPane);			oldSplitPane.setDividerLocation(dividerPos);			SwingUtilities.invokeLater(new Runnable()			{				public void run()				{					newSplitPane.setDividerLocation(0.5);					editPane.focusOnTextArea();				}			});		}		else		{			JSplitPane newSplitPane = splitPane = new JSplitPane(orientation,				oldEditPane,editPane);			newSplitPane.setBorder(null);			oldParent.add(splitPane);			oldParent.revalidate();			Dimension size;			if(oldParent instanceof JSplitPane)				size = oldParent.getSize();			else				size = oldEditPane.getSize();			newSplitPane.setDividerLocation(((orientation				== JSplitPane.VERTICAL_SPLIT) ? size.height				: size.width) / 2);			SwingUtilities.invokeLater(new Runnable()			{				public void run()				{					editPane.focusOnTextArea();				}			});		}	}