import java.awt.*; import java.awt.geom.AffineTransform; public class Transform5 extends Canvas{ public void paint(Graphics alggr){ Graphics2D g=(Graphics2D)alggr; g.setTransform(AffineTransform.getShearInstance(Math.PI/4, 0)); g.fillRect(20, 20, 40, 20); } }