Processing Forum
now i think the issue is the for loop starting at 0, and trying to -1 from it, but i don't know how to get around it.java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at processing.core.PApplet.selectCallback(PApplet.java:6697)at processing.core.PApplet.access$000(PApplet.java:158)at processing.core.PApplet$6.run(PApplet.java:6684)at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)at java.awt.EventQueue.access$400(EventQueue.java:82)at java.awt.EventQueue$2.run(EventQueue.java:676)at java.awt.EventQueue$2.run(EventQueue.java:674)at java.security.AccessController.doPrivileged(Native Method)at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Caused by: java.lang.ArrayIndexOutOfBoundsException: -1at sketch_130820d.folderSelected(sketch_130820d.java:98)... 21 more