package praktikum1; import java.awt.*; import java.awt.image.*; import javax.swing.*; public class Triibustik extends JApplet { private static final long serialVersionUID = 1L; public void paint(Graphics g0) { Graphics2D g = (Graphics2D) g0; BufferedImage bi = new BufferedImage(300, 300, BufferedImage.TYPE_INT_RGB); Graphics2D bg = bi.createGraphics(); bg.rotate(Math.PI*Math.random(), 150, 150); for (int y = -100; y < 400; y += 20) { bg.fillRect(-100, y, 400, 10); } g.setPaint(new TexturePaint(bi, new Rectangle(0, 0, bi.getWidth(), bi.getHeight()))); g.fillOval(50, 50, 100, 100); //g.drawImage(bi, 0, 0, this); } }