Here is an example applet that uses my Java GradientPainter package
to draw smooth color gradients. Try it out!
Instructions:
- Change the colors of a gradient segment by clicking on the color
buttons on the far right.
- Use the Split button to create more segments.
- Select a segment by clicking on it.
- Change segment sizes by dragging the little bars below the big gradient
sample.
- Move and change your segments using the Up, Down, and Flip buttons.
- Discard a segment with the Del button.
- Preview the Java code needed to create your gradient segments
by clicking on the Code.. button.
- Set the render style of the lower preview using the "Mode:" pulldown.
- Set the angle of the lower preview by typing into the "Angle:" box.
- Change the center of the lower preview by click where you want the
center to be.
Using GradientPainter in Your Programs and Applets
The GradientPainter package is free. You may use it in any way
you like. Of course, it comes with no warranty of any kind.
The GradientPainter package works in both Java 1.1 and Java 2, but
it will not work in Java 1.0. For specific information, read
the Gradient Painter API documentation.
You can download the gradient painter package, or the source code,
or the JGradientDesigner applet/application. Note that the classes,
docs, and sources are each separate downloads.
- grad.jar - Java grad.* gradient painter package
- grad-docs.jar - Gradient painter package API docs
- grad-srcs.jar - Gradient painter package source
- JGD.jar - the Java Gradient Designer applet/application (above)