ImageIcon can not be drawn and NullPointerException was thrown

I have a dialog that displays list of items whose cell renderer is customized using ImageIcons. Permissions have been granted properly, I think. The dialog can be shown but it can not draw it's children element correctly. And java.lang.NullPointerException was thrown:
java.lang.NullPointerException
        at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
        at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
        at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
        at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
        at javax.swing.ImageIcon.paintIcon(Unknown Source)
        at javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(Unknown Source)
        at javax.swing.plaf.basic.BasicToggleButtonUI.paint(Unknown Source)
        at javax.swing.plaf.ComponentUI.update(Unknown Source)
        at javax.swing.JComponent.paintComponent(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
        at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
        at javax.swing.JComponent._paintImmediately(Unknown Source)
        at javax.swing.JComponent.paintImmediately(Unknown Source)
        at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow
n Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)The same app. can be run without problem in normal environment.(comp. in secure mode). It would be very nice if u can give me some advices about that.
(Possibly I have not understanden any important aspects about JSE in this field.)
Thanks!

Done. I should have read through the usage of Icons in Java Tutorial first. If anybody has this similar problem, that is a good source for clearing.

Similar Messages

Maybe you are looking for