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


Groups > comp.lang.java.gui > #5070

Re: Syntax highlighting

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.gui
Subject Re: Syntax highlighting
Date 2012-03-03 21:09 -0500
Organization A noiseless patient Spider
Message-ID <jiuir1$oms$1@dont-email.me> (permalink)
References <4f4e2a69$0$22515$426a74cc@news.free.fr> <4f521cd4$0$15667$426a74cc@news.free.fr>

Show all headers | View raw


On 03/03/2012 08:29 AM, ricoh51 wrote:
> On Wed, 29 Feb 2012 13:38:49 +0000, 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?
>
> Finally, I wrote a simple class to test the syntax highlighting :
> http://ricoh51.free.fr/eric/java/SyntaxHighLightingTest.java

Very nice!

> It works well and is very easy to understand(JTextPane +
> DefaultStyledDocument + DocumentListener)

Yep.

> Any suggestions to improve this class?

Well, I'd turn the question around.
How do you hope to extend/improve your editor?

Thanks for following up with your original post.
Not all that many will do that, much appreciated.

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Syntax highlighting ricoh51 <ricoh51@free.fr> - 2012-02-29 13:38 +0000
  Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-02-29 10:27 -0500
    Re: Syntax highlighting ricoh51 <ricoh51@free.fr> - 2012-02-29 21:14 +0000
      Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-02-29 18:02 -0500
        Re: Syntax highlighting Lew <noone@lewscanon.com> - 2012-03-01 09:49 -0800
          Re: Syntax highlighting ricoh51 <ricoh51@free.fr> - 2012-03-01 22:24 +0000
        Re: Syntax highlighting ricoh51 <ricoh51@free.fr> - 2012-03-01 21:16 +0000
          Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-03-01 19:23 -0500
          Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-03-02 11:21 -0500
  Re: Syntax highlighting Roedy Green <see_website@mindprod.com.invalid> - 2012-03-02 04:39 -0800
  Re: Syntax highlighting ricoh51 <ricoh51@free.fr> - 2012-03-03 13:29 +0000
    Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-03-03 21:09 -0500
      Re: Syntax highlighting Éric Marchand <eric.marchand51@gmail.com> - 2012-03-05 01:32 -0800
        Re: Syntax highlighting Jeff Higgins <jeff@invalid.invalid> - 2012-03-05 05:35 -0500
          Re: Syntax highlighting Éric Marchand <eric.marchand51@gmail.com> - 2012-03-05 04:59 -0800

csiph-web