by, 03-06-2012 at 08:02 PM (800 Views)
Paint attributes define fill pattern in Graphic2D rendering context. An objectís instance is created for setting the paint attributes which makes possible the implementation of the paint interface. setPaint method is called along with Graphic2D, as a parameter.
Paint interface is implemented by using these 3 classes.
Create a GradientPaint by specifying.
- Beginning position/color
- Ending position/color
Proportionally, gradient change takes place from 1 color to other, with line which connects 2 positions.