Java Tutorial/Intermediate GUIs/Writing a simple editor

Writing a simple editor
Writing a simple editor is a good exercise to learn some of the details of a widget toolkit. This editor uses as the editor but apparently the requires a buffer that has not been implemented yet, so you will have to start writing this editor by implementing a buffer class. You have to consider the interface and the may require a bit of thought, but the buffer itself is also not entirely trivial.

Exercises

 * Fill in the auto-generated method stubs (the class BufferContent is a gap).
 * Improve your editor with a
 * Add optional display of line numbers and bookmarks.
 * Add syntax highlighting for Java using an ANTLR parser.
 * Add code folding for sections of code (e.g. methods, blocks and inner classes). The following method does iterate over sections (subclasses of ) of an . Can these sections be useful for code folding?