The application developer has no control and usually no knowledge of the Look and Feel, which leaves something of a hole in the Swing object model - there is (initially) no way to override or modify the rendering of a component - to annotate it, decorate it, etc.
But there is, and it's very simple. The call into the UI is from the paint() or paintComponent() method, with a Graphics as an argument. The JComponent can do whatever it likes in that call. When I write trivial JComponents, I render directly. But that still isn't enough to make it simple or easy.
Enter JXLayer.
This under-reported and under-used library is pure magic, and the demos need to be seen to be believed. It provides a very simple extension for modifying and hacking the rendering of a JComponent without knowing any details of the UI plugin. It transparently wraps the JComponent's paint method and provides an event model to trigger a repaint when anything in the rendering hack changes, as well as when the original component changes. Wrapping the paint() method allows, for example, substituting the Graphics for a DoubleBuffer, to which image effects or transforms can be applied, and in my most common use case, rendering custom backgrounds and icons around JTextFields to provide context-dependent assistance to the user in a more flexible (and portable) way than setBackground, setTooltipText and so forth can hope to offer.
And the last magic missing piece is the replace() method in GroupLayout, which allows one to design a UI in Matisse, NetBeans's UI designer, and wrap components in JXLayer later.
I would also like to offer tribute to the authors of the SwingX widgets, without whom my job would be infinitely harder and uglier. Many of the features of SwingX are making their way into JDK proper, but the full, extended toolkit, once integrated into Matisse, is a wonder.