aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
Author

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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problems with create[Volatile]Image in JInternalFrame
 
Similar Threads
Scaled BufferedImage woes
Palm Image Quality
How to create image from array of pixels?
drawImage() problem
Why ImageIO.write() creates image with double size than original