The getter/setter idiom has always been problematic; it allows
too-broad access to the implementation of your classes, degrading
maintainability as a consequence. The J2SE 5.0 annotation (or
metadata) feature provides an alternative....
The Apache Software Foundation's log4j logging library is one of
the better logging systems around. It's both easier to use and more
flexible than Java's built-in logging system. This article shows
you how to extend log4j with a...
Allen Holub's past Java Toolbox column, "
Why Getter and Setter Methods Are Evil," discussed the downside
of the getter/setter idiom. That article presented a design-level
solution. (By keeping your design in the problem domain as...
This "Create Client-Side User Interfaces in HTML" series continues
by examining the HTMLPane sources. Part 2 offers
examples of how to customize the JEditorPane to
support custom tags and also provides an extended description of
This article presents a variant on Swing's JEditorPane
that makes it possible to specify an entire screen of your
client-side user interface (UI) in HTML. JEditorPane is designed to
let you put an HTML text component inside a dialog...
The getter/setter idiom is a commonplace feature in many Java
programs. Most of these accessor methods, however, are unnecessary
and can severely impact your systems' maintainability. Using
accessors violates the basic object-oriented...
Most good designers avoid implementation inheritance (the
extends relationship) like the plague. As much as 80
percent of your code should be written entirely in terms of
interfaces, not concrete base classes. The Gang of Four...
The Java Toolbox column returns with this tutorial
about a date-selection widget that displays a calendar and lets you
select a date by clicking on it. It heavily uses the Gang of Four
Decorator design pattern, so it provides a good...
This article, the second in a multipart series on threads,
discusses the perils that can arise when you approach
multithreading in a naive way. As is the case with the entire
series, this article assumes reader familiarity with the...
Programming Java threads isn't nearly as easy (or as
platform-independent) as most books would have you believe, and all
Java programs that use the AWT are multithreaded. This article is
the first in a series that discusses the things...