Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.gui Subject: Re: Syntax highlighting Date: Wed, 29 Feb 2012 10:27:43 -0500 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <4f4e2a69$0$22515$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 29 Feb 2012 15:27:24 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="BSKXKq4dV+7jFlM4JDctyw"; logging-data="24495"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3h1FaixDVswgnxntTZTtBeq/0AD9PO3A=" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120207 Icedove/3.0.11 In-Reply-To: <4f4e2a69$0$22515$426a74cc@news.free.fr> Cancel-Lock: sha1:pc4q0WyQiDvumH7Ql3hXTEpF7Kw= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:5060 On 02/29/2012 08:38 AM, ricoh51 wrote: > Hi all, > I need to make an editor with syntax highlighting. The lexer run as I > want, but I do not know how to start th GUI. > I have choose a JTextPane to do that, is this a good choice? > Do I need to extend DocumentListener or DocumentFilter? > Who can help me to start? > I believe I would start by looking at how others have approched the problem. From the first page of results of a web search with the key words swing+syntax+highlight+editor I get these open source projects: RSyntaxTextArea, jEdit Syntax Package, JSyntaxPane, and a very old tutorial article from Sun, "Customizing a Text Editor".