Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28994

Re: How to write a text editor in Java

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
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 <n49rub$1p6$1@dont-email.me> (permalink)
References <editor-20151209153607@ram.dialup.fu-berlin.de>
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

Cross-posted to 2 groups.

Show key headers only | View raw


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       |

Back to comp.lang.javascript | Previous | Next | Find similar | Unroll thread


Thread

Re: How to write a text editor in Java Martin Gregorie <martin@address-in-sig.invalid> - 2015-12-09 18:29 +0000

csiph-web