Filthy Rich Clients: Developing Animated and Graphical Effects for Desktop Java™ Applications
by Chet Haase, Romain Guy
Chapter 7. Gradients
GRAPHICS design follows trends, and a current trend is to use gradients everywhere. Beyond the fashion, gradients are easy and versatile tools that can be used to create advanced effects like reflections and fade-out. Because of their versatility and ease of use, they are the most widely used Paint state of the Graphics object.
Up to J2SE 5.0, drawing a gradient was as simple as creating a new instance of java.awt.GradientPaint and setting it on a Graphics object. This class is very useful but sports some limitations. For example, you can draw only linear gradients, and you can specify only two colors. If you work with graphic designers, who use advanced tools like those found in Adobe Photoshop, you might find yourself in ...
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