List of usage examples for java.awt Graphics2D finalize
@Deprecated(since = "9") public void finalize()
From source file:MyCanvas.java
public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; Image img1 = Toolkit.getDefaultToolkit().getImage("yourFile.gif"); g2.drawImage(img1, 10, 10, this); g2.finalize(); }