 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lightning McQueen Guest
|
Posted: Tue May 01, 2007 7:10 am Post subject: Null pointer exception while trying to repaint the component |
|
|
I am trying to repaint a component that displays a buffered image when
the component is scrolled. I get the following error:
[java] java.lang.NullPointerException: NullSD does not handle
this operation
[java] at sun.java2d.NullSurfaceData.getRaster(Unknown Source)
[java] at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(Unknown
Source)
[java] at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown
Source)
[java] at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown
Source)
[java] at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown
Source)
[java] at sun.java2d.pipe.AlphaPaintPipe.renderPathTile(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer
$Composite.renderBox(Unknown Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.spanClipLoop(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderSpans(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderPath(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.fill(Unknown Source)
[java] at sun.java2d.pipe.ValidatePipe.fill(Unknown Source)
[java] at sun.java2d.SunGraphics2D.fill(Unknown Source)
[java] at
i3dea.ditto.DocumentImageDisplay.paintZone(DocumentImageDisplay.java:
256)
[java] at
i3dea.ditto.DocumentImageDisplay.paintComponent(DocumentImageDisplay.java:
467)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JViewport.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown
Source)
[java] at javax.swing.JComponent.paintDoubleBuffered(Unknown
Source)
[java] at javax.swing.JComponent._paintImmediately(Unknown
Source)
[java] at javax.swing.JComponent.paintImmediately(Unknown Source)
[java] at javax.swing.RepaintManager.paintDirtyRegions(Unknown
Source)
[java] at javax.swing.SystemEventQueueUtilities
$ComponentWorkRequest.run(Unknown Source)
[java] at java.awt.event.InvocationEvent.dispatch(Unknown Source)
[java] at java.awt.EventQueue.dispatchEvent(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.run(Unknown Source)
Thanks
Mangai |
|
| Back to top |
|
 |
Daniel Pitts Guest
|
Posted: Tue May 01, 2007 8:32 pm Post subject: Re: Null pointer exception while trying to repaint the compo |
|
|
On Apr 30, 10:48 pm, Lightning McQueen <mangaise...@gmail.com> wrote:
| Quote: | I am trying to repaint a component that displays a buffered image when
the component is scrolled. I get the following error:
[java] java.lang.NullPointerException: NullSD does not handle
this operation
[java] at sun.java2d.NullSurfaceData.getRaster(Unknown Source)
[java] at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(Unknown
Source)
[java] at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown
Source)
[java] at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown
Source)
[java] at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown
Source)
[java] at sun.java2d.pipe.AlphaPaintPipe.renderPathTile(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer
$Composite.renderBox(Unknown Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.spanClipLoop(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderSpans(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderPath(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.fill(Unknown Source)
[java] at sun.java2d.pipe.ValidatePipe.fill(Unknown Source)
[java] at sun.java2d.SunGraphics2D.fill(Unknown Source)
[java] at
i3dea.ditto.DocumentImageDisplay.paintZone(DocumentImageDisplay.java:
256)
[java] at
i3dea.ditto.DocumentImageDisplay.paintComponent(DocumentImageDisplay.java:
467)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JViewport.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown
Source)
[java] at javax.swing.JComponent.paintDoubleBuffered(Unknown
Source)
[java] at javax.swing.JComponent._paintImmediately(Unknown
Source)
[java] at javax.swing.JComponent.paintImmediately(Unknown Source)
[java] at javax.swing.RepaintManager.paintDirtyRegions(Unknown
Source)
[java] at javax.swing.SystemEventQueueUtilities
$ComponentWorkRequest.run(Unknown Source)
[java] at java.awt.event.InvocationEvent.dispatch(Unknown Source)
[java] at java.awt.EventQueue.dispatchEvent(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.run(Unknown Source)
Thanks
Mangai
|
I think that JScrollPane does this automatically for you. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|