Topics in this Chapter
Attributes and Styles
Paragraph and Character Attributes
Displaying Icons and Attributes in
In the last chapter, you saw how the text components store the text that they draw and how to subclass the
PlainDocument class used by
JTextField to implement various forms of input validation.
PlainDocument is a very simple text model that is sufficient for a component that uses a single font and two colors, but the
Document interface itself also allows you to associate attributes with arbitrary ranges of content within the model, a facility that can be exploited by using the
In this chapter, you'll see exactly what the attributes that you can store ...