import java.awt.*; import java.awt.geom.*; import java.awt.font.*; public class Kujund2a extends Canvas{ public void paint(Graphics alggr){ Graphics2D g=(Graphics2D)alggr; g.setPaint(new GradientPaint(0, 100, Color.yellow, 100, 100, new Color(0, 200, 100), true )); g.fillRect(0, 0, getSize().width, getSize().height); } }