I have to show text as java text. I mean, to open file in an editor pane and to color the special words (like, highlight the key words (import, private, etc.) with the same color...)
as a result I want to show the file as it is ahown in other editors of java(eclipse, netBeans, etc..)
Does anybody know code that do this thing?
It will be great if someone know and can give it to me.
thank you all,
You mean like there's different colours in the code examples posted here? You need some code which tokenizes and parses a string as if it were Java. That code would have to understand the basic syntax of Java for a start.