This site requires JavaScript, please enable it in your browser!
Greenfoot back
Pilo5201
Pilo5201 wrote ...

2019/9/8

Problem by editing new project

Pilo5201 Pilo5201

2019/9/8

#
Helle there, every time I want to edit something in my completly new project I always get the same exception Exception in thread "AWT-EventQueue-0" java.lang.NegativeArraySizeException at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75) at java.awt.image.Raster.createPackedRaster(Raster.java:467) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.awt.GraphicsConfiguration.createCompatibleImage(GraphicsConfiguration.java:150) at greenfoot.util.GraphicsUtilities.createCompatibleImage(GraphicsUtilities.java:170) at greenfoot.core.WorldHandler.getSnapShot(WorldHandler.java:997) at greenfoot.gui.GreenfootFrame.getWorldGreyedSnapShot(GreenfootFrame.java:1249) at greenfoot.gui.GreenfootFrame.lambda$compileStarted$7(GreenfootFrame.java:1238) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) In my project there is only one world class with import greenfoot.*; public class Game extends World { public Game () { super(770,770,70); } } and one actor called Player with nothing writen so far If anyone knows, why there is this exception, please help
danpost danpost

2019/9/8

#
Change your "super" line to:
super(11, 11, 70);
You need to login to post a reply.