How to change jdesktoppane background image in MDI (Multiple Documents interface) using java netbeans? Means I added the jdesktoppane to java MDI so now I want to change default background image of that jdesktoppane which I’m using in java MDI. Any easy way?
Check attached snapshot link may be you will better understand my question what I want.
+1 to MadProgrammers comment.
Simply override
JDesktopPanepaintComponent(..)and calldrawImage(Image img,int x,int y,ImageObserver io)to draw an image.Dont forget to honor the paint chain and call
super.paintComponent(g)as first call in overriddenpaintComponent(..)methodHere is an example: