mwalker
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("PTSW atermark.g if");
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.
ImageIcon waterMark = ImageLoader.loadIcon("PTSW
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 ;°)
Just wonder why it took so long ;°)
It's cold, all fluids are thicker .....
;JOOP!
;JOOP!