Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane and creating reserved words  RSS feed

 
Aron Jhed Amiscosa
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there. i would like to get some idea on this

i want to use a textpane and make it act like a compiler
will detect reserved words and change its color different from normal texts

my idea is a separate class of enum containing the reserved words and the text pane should have a document listener or such...

somebody help me started please. correct my concept if im wrong
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Syntax Highlighting by Ostermiller.
 
Aron Jhed Amiscosa
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Syntax Highlighting by Ostermiller.


that should wrap it up. thanks.


package com.Ostermiller does not exist. while gnu.getopt within the same jar is being recognized.


thanks. i managed to make it work.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!