|
From: SourceForge.net <no...@so...> - 2005-07-20 18:07:19
|
Bugs item #1241755, was opened at 2005-07-20 18:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101703&aid=1241755&group_id=1703 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Reuben Grinberg (reubgr) Assigned to: Nobody/Anonymous (nobody) Summary: Adding DisplaySurface fails before displayable is added Initial Comment: Adding a DisplaySurface to a Containter (such as a JPanel) before a Displayable has been added to the DisplaySurface leads a NullPointerException since the Painter has never been set. java.lang.NullPointerException at uchicago.src.sim.gui.Painter.createBufferedImage(Unknown Source) at uchicago.src.sim.gui.LocalPainter.paint(Unknown Source) at uchicago.src.sim.gui.DisplaySurface$DUpdate.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:171) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:178) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:170) at java.awt.EventDispatchThread.run (EventDispatchThread.java:100) In addition, since DisplaySurface doesn't seem to add displayables via the normal Container.add() mechanism, I can't call myDisplaySurface.getComponentCount() as a work around. This also means that I can't add a Container listener to the DisplaySurface to know when a Displayable has been added. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101703&aid=1241755&group_id=1703 |