Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Something Error!

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Location
    philippines
    Posts
    28
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Angry Something Error!

    What should I do ?

    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
    	at LoginBank$2.actionPerformed(LoginBank.java:78)
    	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    	at java.awt.Component.processMouseEvent(Component.java:6505)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    	at java.awt.Component.processEvent(Component.java:6270)
    	at java.awt.Container.processEvent(Container.java:2229)
    	at java.awt.Component.dispatchEventImpl(Component.java:4861)
    	at java.awt.Container.dispatchEventImpl(Container.java:2287)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    	at java.awt.Container.dispatchEventImpl(Container.java:2273)
    	at java.awt.Window.dispatchEventImpl(Window.java:2719)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
    	at java.awt.EventQueue.access$000(EventQueue.java:102)
    	at java.awt.EventQueue$3.run(EventQueue.java:662)
    	at java.awt.EventQueue$3.run(EventQueue.java:660)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    	at java.awt.EventQueue$4.run(EventQueue.java:676)
    	at java.awt.EventQueue$4.run(EventQueue.java:674)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Something Error!

    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
    at LoginBank$2.actionPerformed(LoginBank.java:78)
    The error says that the code at line 78 used an index that was past the end of the array. The index value was 1 so the array's length must be less than 2.
    What should I do ?
    The code should test that the index it is going to use is within the bounds of the array.
    Remember array indexes range from 0 to the array length-1
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Please! Help me to this error "ERROR CANNOT FIND SYMBOL"
    By mharck in forum Object Oriented Programming
    Replies: 8
    Last Post: July 3rd, 2012, 09:20 AM