English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm unsure how to create a class that color codes words entered by syntax. I already have an application similar to Textpad, I just need to add this feature. please help!

2007-03-06 12:36:11 · 3 answers · asked by rocketj3 1 in Computers & Internet Programming & Design

3 answers

What I would do is to create a class A, to store all keywords in a data structure (i.e. hash table), and some kind of lookup routine that returns what type of matched text is (i.e. constants, literals, variables). Then in your display class, depending on what the type is, you can just change the color of the drawText() to the color from your class A.

2007-03-06 15:36:07 · answer #1 · answered by JackBauer 2 · 0 0

NetBeans, it particularly is from sunlight. it is likewise the main suitable documented. NetBeans facilitates textbook code. Many different IDEs use proprietary code which you won't be able to tweak, and muddies up the photograph. Eclipse may be the main suitable element on account that sliced bread for all i be attentive to, yet no person ever took the time to record it. Futhermore, Eclipse is a memory hog and a a million/2. i replaced into astonished how quite some the pc's materials are devoured up whilst Eclipse is working. BlueJ is a lecture room gadget. Get NetBeans, in case you could have BlueJ, get the plug-in in NetBeans for BlueJ.

2016-11-28 03:04:58 · answer #2 · answered by ? 4 · 0 0

Take a look at JEdit. It's open source, so download the source code and look at how the editor(s) do it.

2007-03-09 02:56:38 · answer #3 · answered by vincentgl 5 · 0 0

fedest.com, questions and answers