Making a JDesktopPane transparent

Play with setOpaque.

Main.java:

import java.awt.image.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.awt.*;
import java.net.*;
 
public class Main extends JFrame
{
   JDesktopPane desktop;
 
   public Main() {
      desktop = new JDesktopPane(); 
      setContentPane(desktop);
      setBackgroundImage();
      createInternalFrame();
      setSize(new Dimension(500, 300));
      setLocation(100, 100);
 
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent we) {
            System.exit(0); 
         }
      });
   }
 
   protected void setBackgroundImage() {
      try {
         ImageIcon icon = new ImageIcon(new URL("http://www.esus.com/images/mong.jpg"));
         JLabel label = new JLabel(icon);
         label.setBounds(0, 0, icon.getIconWidth(), icon.getIconHeight());
  
         desktop.add(label, new Integer(Integer.MIN_VALUE));
      } catch(MalformedURLException e) {
         System.out.println(e);
      }
   }
  
   protected void createInternalFrame() {
      JInternalFrame frame = new JInternalFrame("InternalFrame", 
         true,    // resizable
         true,    // closable
         true,    // maximizable
         true);   // iconifiable
      frame.setVisible(true); 
      desktop.add(frame);
      frame.setSize(300, 100);
      try {
         frame.setSelected(true);
      } catch (java.beans.PropertyVetoException e) {}
      
      desktop.putClientProperty("JDesktopPane.dragMode", "outline");
 
      JLabel label = new JLabel("Name:");
      JTextField textfield = new JTextField(20);
      JRadioButton rb1 = new JRadioButton("Male");
      JRadioButton rb2 = new JRadioButton("Female");
      ButtonGroup group = new ButtonGroup();
      group.add(rb1);
      group.add(rb2);
 
      frame.getContentPane().setLayout(new FlowLayout());
      frame.getContentPane().add(label);
      frame.getContentPane().add(textfield);
      frame.getContentPane().add(rb1);
      frame.getContentPane().add(rb2);
 
      frame.setOpaque(false);
      frame.setBackground(new Color(0,0,0,0));
      rb1.setOpaque(false);
      rb2.setOpaque(false);
   }
 
   public static void main(String []args) throws Exception {
      Main main = new Main();
      main.show();      
   }
}