>>227
-------------------------------------------------------------
import javax.swing.*; import java.awt.*; import java.io.*;
public class IconWatcher implements Icon {
  final Icon icon;
  public IconWatcher (Icon icon) { this.icon = icon; }
  public int getIconHeight () { return icon.getIconHeight (); }
  public int getIconWidth () { return icon.getIconWidth (); }
  public void paintIcon (Component c, Graphics g, int x, int y) { icon.paintIcon (c, g, x, y); }
  protected void finalize () throws Throwable { System.err.println ("finalized: "+ this); }
  public static void main (String[] args) throws Exception {
    JLabel label = new JLabel ();
    label.setIcon (new IconWatcher (new javax.swing.plaf.metal.MetalCheckBoxIcon ()));
    label.setIcon (new javax.swing.plaf.metal.MetalComboBoxIcon ());
    System.gc ();
    System.out.print ("enter ->");
    BufferedReader d = new BufferedReader (new InputStreamReader (System.in));
    d.readLine ();
  }
}
-------------------------------------------------------------
finalized: IconWatcher@786e64
enter ->
-------------------------------------------------------------