Reading This Book
We’re well aware that most readers don’t read the Preface. You have our permission to skip
it, provided that you look at the Conventions
section. That section is particularly important because in this book we
experiment with a few new techniques for explaining the Swing classes.
As we said earlier, everything in Swing is a JavaBean. This means that
much of an object’s behavior is controlled by a set of properties, which are manipulated by accessor methods. For example, the property color is accessed by the getColor( ) (to find out the color) and
setColor( ) (to change the color)
methods. If a property has a boolean value, the get method is often replaced by an is method; for example,
the visible property would have the
isVisible( ) and setVisible( ) methods.
We found the idea of properties very powerful in helping us
understand Swing. Therefore, rather than listing all of a class’s
accessor methods, we decided to present a table for each class, listing
the class’s properties and showing the property’s data type, which accessor methods are present,
whether the property is “bound” (i.e., changing the property generates a
PropertyChangeEvent), when it was introduced (1.2 is the default; 1.3 and 1.4 are marked where appropriate), and the property’s default value. This approach certainly saves paper (you didn’t really want a 2,000-page book, did you?) and should make it easier to understand what a component does and how it is structured. Furthermore, if you’re not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access