Adding a background image to a JTree

Main.java:

import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*;
import java.net.*;
import java.awt.event.*;
 
public class Main extends JFrame
{
   public Main() {
      DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
      for (int i=0; i<10; i++) {
         DefaultMutableTreeNode child = new DefaultMutableTreeNode("Child " + (i+1));
         root.add(child);
      }
      JTree tree = new JTree(root) {
         ImageIcon icon = new ImageIcon("mong.jpg");
 
         public void paint( Graphics g ) 
         { 
            // tile it
            Dimension d = this.getSize(); 
            for(int i=0; i<d.width; i+=icon.getIconWidth()) { 
               for(int j=0; j<d.height; j+=icon.getIconHeight()) { 
                  g.drawImage(icon.getImage(), i, j, null, null); 
               }
            }
 
            super.paint(g); 
         } 
      }; 
 
      tree.setOpaque( false );
  
 
      DefaultTreeCellRenderer cr = new DefaultTreeCellRenderer();
      cr.setOpaque(false);
      cr.setBackground(new Color(0, 0, 0, 0));  
      cr.setBackgroundNonSelectionColor(null);
      tree.setCellRenderer(cr);
 
      getContentPane().add(new JScrollPane(tree));
 
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent we) {
            System.exit(0);
         }
      });
   }
 
   public static void main(String []args) {
      Main main = new Main();
      main.setSize(400, 400);
      main.setVisible(true);
   }
}

Image used: http://www.esus.com/images/mong.jpg