Unlike most other text editors, the selection API permits selection and concurrent manipulation of multiple, non-contiguous regions of text. Methods in this class that deal with selecting text rely upon classes derived the {@link Selection} class. @author Slava Pestov @author John Gellene (API documentation) @version $Id: JEditTextArea.java,v 1.320 2004/08/12 22:42:45 spestov Exp $
To use it in your app, treat it like any other component, for example:
JEditTextArea ta = new JEditTextArea(); ta.setTokenMarker( new JavaTokenMarker() ); ta.setText( "public class Test {\n" + " public static void main(String[] args) {\n" + " System.out.println(\"Hello World\");\n" + " }\n" + "}" );@author Slava Pestov @version $Id$
|
|
|
|