Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to apply Syntax Highlighting in JTextArea

843806Feb 29 2008 — edited Mar 2 2008
Hi folks.

At the moment my program does this:

The user can drag and drop images into an environment which corresponds creates a Java file.
So there is a panel that the user can drag images from and drop them to another panel. This in turn creates a Java file which is displayed at run time in a JTextArea.

I would like to use syntax highlighting here. I have come across a couple of similar questions in this forum but so far haven't found a great example.
Can anyone please point me to a good tutorial/example?

Many thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2008
Added on Feb 29 2008
10 comments
678 views