aspose file tools
The moose likes Swing / AWT / SWT and the fly likes draw image on JDesktopPane Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "draw image on JDesktopPane" Watch "draw image on JDesktopPane" New topic
Author

draw image on JDesktopPane

Michael Remijan
Ranch Hand

Joined: May 29, 2002
Posts: 103

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


<a href="http://www.linkedin.com/in/mjremijan" rel="nofollow">
<img src="http://www.linkedin.com/img/webpromo/btn_viewmy_160x25.png" border="0" >
</a>
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: draw image on JDesktopPane
 
Similar Threads
can you resolve these questions?Thanks.
JDesktopPane
How to launch JInternalFrame from a JTabbedPane
Scrolling a JDesktopPane when JInternalFrames go outside the Standard View
how to create windows like posit notes?