View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Fill Patterns

    by , 03-06-2012 at 09:02 PM
    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.

    • Color
    • TexturePaint
    • GradientPaint

    Create a GradientPaint by specifying.

    • Beginning position/color
    • Ending position/color