Adding Syntax Highlighting for JPanel

B

Berlin Brown

Is it possible to add syntax highlighting to a JPanel style panel from
an existing java based text editor to a custom application. I was
thinking about doing this with JEdit and I think they will add this in
the next version. But I don't it currently supports this without a lot
of hacking. Has anybody done this any other editor panel.

Ideally, I am trying to add Python/XML syntax highlighting I want to
put out to people.
 
?

=?ISO-8859-1?Q?Daniel_Sj=F6blom?=

Berlin said:
Is it possible to add syntax highlighting to a JPanel style panel from
an existing java based text editor to a custom application. I was
thinking about doing this with JEdit and I think they will add this in
the next version. But I don't it currently supports this without a lot
of hacking. Has anybody done this any other editor panel.

I've used the old JEdit syntax highlighting package (supposedly the
JEdit people are trying to create a new standalone component, but I have
not investigated it, since I no longer need it). It is available here:
http://sourceforge.net/projects/jedit-syntax/. It behaves mostly like
any other Swing component, but the disadvantage of it is that it is
quite old, and doesn't conform to the design philosophy of newer Swing.
If I recall correctly, the main problem was the non-standard handling of
keyboard events, which required some work to get around. Other than
that, I think it is quite good, and very fast (which incidentally
probably has something to do with its age.)
 
B

Bill Tschumy

I've used the old JEdit syntax highlighting package (supposedly the
JEdit people are trying to create a new standalone component, but I have
not investigated it, since I no longer need it). It is available here:
http://sourceforge.net/projects/jedit-syntax/. It behaves mostly like
any other Swing component, but the disadvantage of it is that it is
quite old, and doesn't conform to the design philosophy of newer Swing.
If I recall correctly, the main problem was the non-standard handling of
keyboard events, which required some work to get around. Other than
that, I think it is quite good, and very fast (which incidentally
probably has something to do with its age.)

I've also used this package and I highly recommend it. It is almost a
drop-in replacement for JEditPane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top