Link to home
Start Free TrialLog in
Avatar of mwalker
mwalkerFlag for United States of America

asked on

Background image in a JDesktopPane

Probably, this question has been asked: How do I add a background image to a JDesktopPane. I have already atttempted the following:

      ImageIcon waterMark = ImageLoader.loadIcon("PTSWatermark.gif");
      if (waterMark != null) {
       System.out.println("**** setting the DeskTop with PTS water mark ****");
       JLabel l = new JLabel(waterMark);
       l.setOpaque(true);
       deskTop.add(l, JLayeredPane.FRAME_CONTENT_LAYER);
       deskTop.setBackground(new Color(0x99, 0xCC, 0xCC));
      } else {
        System.err.println("**** PTSWatermark.gif could not be found ****");
      }

where ImageLoader.loadIcon() simply loads the image.  From the println statements, I know that the ImageIcon object is not null.  Can any one help?  

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of sciuriware
sciuriware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zzynx
How do I display an image in the background of a Swing component? http://www.jguru.com/faq/view.jsp?EID=9691
Proposal: split
OK :°)
Just wonder why it took so long ;°)
Avatar of sciuriware
sciuriware

It's cold, all fluids are thicker .....


;JOOP!