Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   Code Highlighting in Text Editor (http://www.programmingforums.org/showthread.php?t=11830)

Riddick Nov 8th, 2006 8:28 AM

Code Highlighting in Text Editor
 
Hi all this is my first post here.

Sorry if it's been asked before, i did search.

Anyway, i am developing a text editor and want to add highlighting to the syntax, to start with HTML then PHP and ASP. But not sure where to start.

I'm coding in Java using the Swing library.

Thanks:)

DaWei Nov 8th, 2006 8:52 AM

Is there an actual question in there somewhere? :confused:

Riddick Nov 8th, 2006 9:19 AM

Sorry,

I am developing a text editor and i want to add highlighting to the source code. But i'm not sure how it's done.

So my question is, can anyone point me in the right direction as to how i go about it?

ReggaetonKing Nov 8th, 2006 10:50 AM

I would recommend looking at this url.
http://www.google.com/search?hl=en&l...ghting+in+Java

Riddick Nov 8th, 2006 1:30 PM

I've searched on google quite a bit and found plenty of examples but i just wondered if anyone had any experience in this and would be able to direct me to good method that wasn't too complicated.

I'm quite new to Java.

Narue Nov 8th, 2006 2:07 PM

>I'm quite new to Java.
And you're writing a graphical text editor with syntax highlighting...

ReggaetonKing Nov 8th, 2006 2:47 PM

I've been studying Java a little over a year and not that long ago was hardly able to create a basic text editor.

Riddick Nov 8th, 2006 3:31 PM

I'm not new to programming.

I just wanted to use Java for the portability. I don't think changing to a different language should be too difficult.

AntiNinja Nov 8th, 2006 4:10 PM

IIRC you can highlight syntax using StringTokenizer and either the rtf or html style in a EditorPane, I dont remember exactly how but look in that direction... Search on google for a plugin or something like that.

Riddick Nov 9th, 2006 3:51 AM

Quote:

Originally Posted by AntiNinja (Post 118644)
IIRC you can highlight syntax using StringTokenizer and either the rtf or html style in a EditorPane, I dont remember exactly how but look in that direction... Search on google for a plugin or something like that.

Thanks, i've found a section in a book about this now. That's hopefully pointed me in the right direction.


All times are GMT -5. The time now is 3:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC