File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Problems with create[Volatile]Image in JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problems with create[Volatile]Image in JInternalFrame" Watch "Problems with create[Volatile]Image in JInternalFrame" New topic

Problems with create[Volatile]Image in JInternalFrame

Jeremy Tartaglia
Ranch Hand

Joined: Mar 11, 2004
Posts: 62
I'm trying to create an MDI application with custom JInternalFrames, called MapFrames. Each MapFrame needs to have access to either a VolatileImage or just a plain Image for double buffering. Now, the problem is that everytime I call createImage or createVolatileImage, it returns a null pointer. I want the size of the [Volatile]Image to be as close to the same size as the viewable area in the MapFrame as possible, so as to conserve memory. I'm creating the [Volatile]Images in the same step as I'm creating the MapFrame. I'd post code to help explain the problem better, but I'm not at my computer at the moment. Any ideas? Thanks in advance!
Oh, as a side, and very off topic, how do you change UIs on the fly? I'm pretty new to Swing. ^^
[ March 11, 2004: Message edited by: Jeremy Tartaglia ]
I agree. Here's the link:
subject: Problems with create[Volatile]Image in JInternalFrame
It's not a secret anymore!