File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 19544
    
  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
Reserved words
about keywords
Usage of Reserved words for Database Table fields
Basic question on foundational Java