I am planning to program a java code editor using Swing and the main feature is highlighting code segments like keywords , strings and variables. I need some suggestions on how i should implement the program, one of my friend told to use 2 separate threads, one for editing and one for highlighting the code, but how to establish communication between those 2 threads ?
if i don't use separate threads, will it have any impact on my program ?
I'm really confused. Please help me, with some suggestions .
EDIT: ONe more Question Should i use a JEditorPane or a JTextPane for this purpose ?