Results 1 to 2 of 2
  1. #1
    helme360 is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default I know the problem is with the ArrayList! I just cant find where

    my problem is that each tile created won't add to the arraylist.

    here is the error output:
    Java Code:
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    	at java.util.ArrayList.RangeCheck(
    	at java.util.ArrayList.get(
    	at Tile.rmPos(
    	at sudokuSolver.rmV(
    	at sudokuSolver.Solve(
    	at sudokuSolver.access$000(
    	at sudokuSolver$1.actionPerformed(
    	at javax.swing.AbstractButton.fireActionPerformed(
    	at javax.swing.AbstractButton$Handler.actionPerformed(
    	at javax.swing.DefaultButtonModel.fireActionPerformed(
    	at javax.swing.DefaultButtonModel.setPressed(
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
    	at java.awt.Component.processMouseEvent(
    	at javax.swing.JComponent.processMouseEvent(
    	at java.awt.Component.processEvent(
    	at java.awt.Container.processEvent(
    	at java.awt.Component.dispatchEventImpl(
    	at java.awt.Container.dispatchEventImpl(
    	at java.awt.Component.dispatchEvent(
    	at java.awt.LightweightDispatcher.retargetMouseEvent(
    	at java.awt.LightweightDispatcher.processMouseEvent(
    	at java.awt.LightweightDispatcher.dispatchEvent(
    	at java.awt.Container.dispatchEventImpl(
    	at java.awt.Window.dispatchEventImpl(
    	at java.awt.Component.dispatchEvent(
    	at java.awt.EventQueue.dispatchEventImpl(
    	at java.awt.EventQueue.access$000(
    	at java.awt.EventQueue$
    	at java.awt.EventQueue$
    	at Method)
    	at java.awt.EventQueue$
    	at java.awt.EventQueue$
    	at Method)
    	at java.awt.EventQueue.dispatchEvent(
    	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
    	at java.awt.EventDispatchThread.pumpEvents(
    	at java.awt.EventDispatchThread.pumpEvents(
    I know it's probably a very silly problem but I just can't find it!
    Last edited by helme360; 07-08-2011 at 05:30 PM.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power


    That's way too much code to wade through. The problem is that you're trying to access an index that is larger than the ArrayList's size. You can't access index 1 unless you have two items in your ArrayList (index 0 and index 1).
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

Similar Threads

  1. Find the index number of strings in an arraylist
    By africanhacker in forum New To Java
    Replies: 3
    Last Post: 03-24-2011, 03:25 PM
  2. Problem- arraylist
    By whizzz in forum New To Java
    Replies: 3
    Last Post: 12-05-2010, 01:13 AM
  3. ArrayList problem.
    By keo in forum New To Java
    Replies: 4
    Last Post: 10-15-2010, 11:22 AM
  4. ArrayList problem
    By brian.baert in forum New To Java
    Replies: 8
    Last Post: 03-06-2010, 01:49 PM
  5. ArrayList problem
    By khamuruddeen in forum New To Java
    Replies: 7
    Last Post: 12-22-2007, 05:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts