Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes draw image on JDesktopPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "draw image on JDesktopPane" Watch "draw image on JDesktopPane" New topic
Author

draw image on JDesktopPane

Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 120
    
    5

Hi,
I have a gif that I want to setup as the "background" of a JDesktopPane object. Any ideas how to do this?


Java EE Evangelist — Author, EJB 3 in Action 2nd Edition — Java Community Process Member
Rene Liebmann
Ranch Hand

Joined: May 02, 2002
Posts: 196
First you have to create your own DesktopPane, which extends from JDesktopPane. Then you have to overwrite the paintComponent(Graphis g) method, where you draw your image.
One year ago I found a JavaAPI called KIWI. This API was free to use. You will find it here.
I think, they provide the same functionality, which you want to have, but if you want to do it by your own, you will find a good example.
Hope that helps

Rene
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I posted how to do this ( with code ), in this post...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
Consider Paul's rocket mass heater.
 
subject: draw image on JDesktopPane
 
Similar Threads
how to create windows like posit notes?
can you resolve these questions?Thanks.
JDesktopPane
How to launch JInternalFrame from a JTabbedPane
Scrolling a JDesktopPane when JInternalFrames go outside the Standard View