Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > need syntax colored text box

Reply
Thread Tools

need syntax colored text box

 
 
ali
Guest
Posts: n/a
 
      01-21-2007
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 >??!!

 
Reply With Quote
 
 
 
 
Liz
Guest
Posts: n/a
 
      01-21-2007
On 21 Jan 2007 07:14:53 -0800, ali wrote:

>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 >??!!


Try HTML. The following tutorial may help:

http://java.sun.com/docs/books/tutor...ents/html.html


 
Reply With Quote
 
 
 
 
ali
Guest
Posts: n/a
 
      01-21-2007

Liz wrote:
> On 21 Jan 2007 07:14:53 -0800, ali wrote:
>
> >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 >??!!

>
> Try HTML. The following tutorial may help:
>
> http://java.sun.com/docs/books/tutor...ents/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 ))

 
Reply With Quote
 
pccslawrencechan@hotmail.com
Guest
Posts: n/a
 
      01-22-2007

ali 寫道:

> Liz wrote:
> > On 21 Jan 2007 07:14:53 -0800, ali wrote:
> >
> > >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 >??!!

> >
> > Try HTML. The following tutorial may help:
> >
> > http://java.sun.com/docs/books/tutor...ents/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 ))


PCCW Solutionx六樓 - Lawrence Chan (濺人) 最叻*I後話人蛋散,
最叻*I後做小動作, 大家小心

 
Reply With Quote
 
Chris Uppal
Guest
Posts: n/a
 
      01-22-2007
ali wrote:

> 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


 
Reply With Quote
 
ali
Guest
Posts: n/a
 
      01-22-2007

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> ali 寫道:
>
> > Liz wrote:
> > > On 21 Jan 2007 07:14:53 -0800, ali wrote:
> > >
> > > >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 >??!!
> > >
> > > Try HTML. The following tutorial may help:
> > >
> > > http://java.sun.com/docs/books/tutor...ents/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 ))

>
> PCCW Solutionx六樓 - Lawrence Chan (濺人) 最叻*I後話人蛋散,
> 最叻*I後做小動作, 大家小心



sorry but what was that ??!!!

 
Reply With Quote
 
ali
Guest
Posts: n/a
 
      01-22-2007

Chris Uppal wrote:
> ali wrote:
>
> > 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


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

thanks alot again

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      01-22-2007
>> PCCW Solutionx*璅 - Lawrence Chan (瞈箔犖) 餉敺閰曹犖,
>> 餉敺撠雿, 憭批振撠敹


ali wrote:
> 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
 
Reply With Quote
 
ali
Guest
Posts: n/a
 
      01-23-2007

Chris Uppal wrote:
> ali wrote:
>
> > 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


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...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/showf...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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
colored text box abracad_1999@yahoo.com HTML 6 02-24-2007 09:38 PM
Show colored text on a text object lrantisi Java 2 11-26-2006 04:04 AM
HTML Colored Text Into Photoshop Intact? alanryder@aol.com HTML 3 10-04-2006 04:29 AM
colored Rich text box AMooR MCAD 0 04-25-2004 10:01 PM
Deleting colored text in MS Word possible? Murgi Computer Support 2 01-14-2004 12:08 AM



Advertisments