Results 1 to 3 of 3
Thread: Method crashing
- 09-25-2011, 04:48 AM #1
Method crashing
The app crashes when i load my method.
The Error:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2
at mainBot.getGrid(mainBot.java:109)
at mainBot.play(mainBot.java:97)
at mainBot.start(mainBot.java:28)
at mainFrame.jButton1ActionPerformed(mainFrame.java:1 01)
at mainFrame.access$100(mainFrame.java:20)
at mainFrame$2.actionPerformed(mainFrame.java:59)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6289)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3267)
at java.awt.Component.processEvent(Component.java:605 4)
at java.awt.Container.processEvent(Container.java:204 1)
at java.awt.Component.dispatchEventImpl(Component.jav a:4652)
at java.awt.Container.dispatchEventImpl(Container.jav a:2099)
at java.awt.Component.dispatchEvent(Component.java:44 82)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4168)
at java.awt.Container.dispatchEventImpl(Container.jav a:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478 )
at java.awt.Component.dispatchEvent(Component.java:44 82)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 614)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)
-
Re: Method crashing
You've got a bug in your code where you're trying to use an array index that's larger than the array, either directly or indirectly. The error message above tells you which line of your code is at fault, and you'll have to fix it since you have the code but we don't. Luck.
- 09-25-2011, 05:01 AM #3
Similar Threads
-
Recursive method infinitely looping
By Iron Lion in forum New To JavaReplies: 4Last Post: 01-23-2011, 08:58 AM -
Looping
By Dean29126 in forum New To JavaReplies: 3Last Post: 09-08-2010, 02:01 PM -
Help with While and For Looping
By gmoney8316 in forum New To JavaReplies: 2Last Post: 03-03-2010, 10:54 PM -
Looping Help Please
By JonnySnip3r in forum New To JavaReplies: 5Last Post: 01-31-2010, 05:57 AM -
looping a function
By Username in forum New To JavaReplies: 2Last Post: 07-30-2007, 05:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks