Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

need syntax colored text box

Thread view: 
ali - 21 Jan 2007 15:14 GMT
i am in middle of a project where i need a JTextbox that can color what
ever code writtern in it depending on the programming language used by
the user.

is this thing available any where ?!!

or i have to do it my self

even if  i have to do it my self how can i color text written in
JTextBoxes >??!!
Liz - 21 Jan 2007 15:43 GMT
>i am in middle of a project where i need a JTextbox that can color what
>ever code writtern in it depending on the programming language used by
[quoted text clipped - 6 lines]
>even if  i have to do it my self how can i color text written in
>JTextBoxes >??!!

Try HTML.  The following tutorial may help:

http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
ali - 21 Jan 2007 19:29 GMT
> >i am in middle of a project where i need a JTextbox that can color what
> >ever code writtern in it depending on the programming language used by
[quoted text clipped - 10 lines]
>
> http://java.sun.com/docs/books/tutorial/uiswing/components/html.html

thanks that will be helpful

still i would like to make it use as my plan B cause creating software
to colorize syntax of 3 or 4 programming languages will take lots of
time form me
so i still hope there is an open source ready made library somewhere on
the net
(( well so optimistic :-P  ))
pccslawrencechan@hotmail.com - 22 Jan 2007 02:24 GMT
ali 寫道:

> > >i am in middle of a project where i need a JTextbox that can color what
> > >ever code writtern in it depending on the programming language used by
[quoted text clipped - 19 lines]
> the net
> (( well so optimistic :-P  ))

PCCW Solutionx六樓 - Lawrence Chan (濺人) 最叻背後話人蛋散,
最叻背後做小動作, 大家小心
ali - 22 Jan 2007 19:14 GMT
> ali 寫道:
>
[quoted text clipped - 24 lines]
> PCCW Solutionx六樓 - Lawrence Chan (濺人) 最叻背後話人蛋散,
> 最叻背後做小動作, 大家小心

sorry but what was that ??!!!
Lew - 22 Jan 2007 22:28 GMT
>> PCCW Solutionx六樓 - Lawrence Chan (濺人) 最叻背後話人蛋散,
>> 最叻背後做小動作, 大家小心

> sorry but what was that ??!!!

Don't even bother answering "Lawrence Chan" spam. Whoever is behind it is an
annoying little weevil, covered in worm poop.

- Lew
Chris Uppal - 22 Jan 2007 18:27 GMT
> i am in middle of a project where i need a JTextbox that can color what
> ever code writtern in it depending on the programming language used by
> the user.

You may be able to reuse the syntax colouring and/or coloured text display from
one of the IDEs or code editors written in Java.

For instance jEdit appears (to a /very/ quick glance) to have a standalone
syntax colouring module, org.gjt.sp.jedit.syntax, and maybe too a standalone
syntax coloured text box, org.gjt.sp.jedit.textarea.  See
   http://www.jedit.org/api/index.html

I have no idea how suitable either of those would be for your purposes, but
they were just examples anyway.  There are (many) other code editors and IDEs
out there which you could look into.

   -- chris
ali - 22 Jan 2007 20:20 GMT
> > i am in middle of a project where i need a JTextbox that can color what
> > ever code writtern in it depending on the programming language used by
[quoted text clipped - 13 lines]
>
>     -- chris

thanks alot i think that will be really helpfull specially the jedit,

thanks alot again
ali - 23 Jan 2007 11:55 GMT
> > i am in middle of a project where i need a JTextbox that can color what
> > ever code writtern in it depending on the programming language used by
[quoted text clipped - 13 lines]
>
>     -- chris

i still want to thank you again your comment really helped after
searching and chasing the thread from Jedit

i got some nice tutorials for syntax coloring i would like to put them
here if any one need them

http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/index.html
http://ostermiller.org/syntax/editor.html

also i found  the API used in JEdit and Jext that is  "jEdit Syntax
Package " developed by  Slava Pestov
http://syntax.jedit.org/
there is a version 2.2.1 which is exactly what i need , the only
difference is it do not support clipboard operations such as copy and
paste, that is really greate i was going to start adding the copy paste
feature to it but i just checked sourceforge for this API

and i found version 2.2.2 which actually supports Copy Paste and other
clipboard operations
http://sourceforge.net/project/showfiles.php?group_id=32650&package_id=24768&rel
ease_id=105717


now i can say my project will be compeleted easily

hope this links will help any one else searching for related stuff

thanks again Chris Uppal and others


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.