Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1558 > unrolled thread

Null pointer exception wh

Started by"Lightning McQueen" <lightning.mcqueen@THRWHITE.remove-dii-this>
First post2011-04-27 15:34 +0000
Last post2011-04-27 15:34 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Null pointer exception wh "Lightning McQueen" <lightning.mcqueen@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
    Re: Null pointer exceptio "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000

#1558 — Null pointer exception wh

From"Lightning McQueen" <lightning.mcqueen@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectNull pointer exception wh
Message-ID<1177998523.252755.210930@p77g2000hsh.googlegroups.com>
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1562 — Re: Null pointer exceptio

From"Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this>
Date2011-04-27 15:34 +0000
SubjectRe: Null pointer exceptio
Message-ID<1178033551.672007.174580@y5g2000hsa.googlegroups.com>
In reply to#1558
  To: comp.lang.java.gui
On Apr 30, 10:48 pm, Lightning McQueen <mangaise...@gmail.com> wrote:
> 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.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web