Hello all,
I am very new to java, I want to add a PNG image to my applet. From some reason when I add this image I receive the following error:
Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt.(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source) at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source) at sun.awt.image.ImageRepresentation.setPixels(Unknown Source) at sun.awt.image.ImageDecoder.setPixels(Unknown Source) at sun.awt.image.PNGImageDecoder.sendPixels(Unknown Source) at sun.awt.image.PNGImageDecoder.produceImage(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source)
When I try adding a jpeg image it works fine. How do I work around this?