This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTextPane and creating reserved words Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextPane and creating reserved words" Watch "JTextPane and creating reserved words" New topic
Author

JTextPane and creating reserved words

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
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

Joined: Oct 27, 2005
Posts: 19556
    
  16

Syntax Highlighting by Ostermiller.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTextPane and creating reserved words
 
Similar Threads
Any Idea? Valid Class Identifiers
about keywords
Usage of Reserved words for Database Table fields
Basic question on foundational Java
Reserved words