« Return to Thread: Repainting a JSVGCanvas
| Hi, the problem is that I get occasionally a NullPointerException in the ScrollListener of the JSVGCanvas. The variable "newview" is null in the updateCompleted method . Rectangle2D newview = getViewBoxRect(); So sometimes the canvas gets white and it has to be repaint. It's immediatly repainted when I resize the frame or when I'm using the scrollbars. But I've inserted if (newview == null) { canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() { @Override public void run() { canvas.repaint(); } }); return; } and this does not have any effect. Another solution maybe would be to avoid to get the Exception. But I don't see what I'm doing wrong. --- Cameron McCormack <cam@...> schrieb am Mi, 28.5.2008: Von: Cameron McCormack <cam@...> |
« Return to Thread: Repainting a JSVGCanvas
| Free embeddable forum powered by Nabble | Forum Help |