Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.javascript,comp.lang.java.programmer Subject: Re: How to write a text editor in Java Date: Wed, 9 Dec 2015 18:29:31 -0000 (UTC) Organization: A noiseless patient Spider Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 9 Dec 2015 18:29:31 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="1830"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+591AUMyI3RrSJ+8qk42BbmAOvKwMG9Cc=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:3tnmjJcxG6qtxi5dW5N2GtJ3Bv0= Xref: csiph.com comp.lang.javascript:28994 comp.lang.java.programmer:33323 On Wed, 09 Dec 2015 14:52:20 +0000, Stefan Ram wrote: > This Java application contains a text editor. > I am always curious to learn how to program a text editor. > The easy answer is to use one of the subclasses of javax.swing.text.EditorKit - all you need to add is the input and output Streams and, probably, a JFileChooser pane to control the streams. Or you can use JEditPane, which uses EditorKit for its text manipulation. I've used JEditorPane to write a simple text-mode terminal application in Java which did more or less what an X-term Console utility or the equivalent Windows terminal emulator does. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |