| Author |
java.lang.ArrayIndexOutOfBoundsException exception in thread
|
Dindy Oreeda
Greenhorn
Joined: May 06, 2011
Posts: 5
|
|
Hi, Guys! I'm making a GUI version of our final project about Memory allocation and program scheduling when I met this error.
After looking up in the internet for solutions and double checking my codes. I can't still find what's wrong with my program.
The error is
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at osProject.DesignInterface.addJobSpecs(DesignInterface.java:153)
at osProject.DesignInterface.actionPerformed(DesignInterface.java:200)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
My codes are :
Feel free to give me some tips and advices. I really appreciate them. Please help me and thanks guys!
|
Your constant enemy is yourself.
|
 |
Matthew Brown
Bartender
Joined: Apr 06, 2010
Posts: 3787
|
|
|
I don't know what the exact problem is, but errors like that are usually because you're making changes to Swing components outside the Swing thread. I'm going to move this to the Swing forum because I think you're more likely to get a useful response there.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
|
http://docs.oracle.com/javase/tutorial/uiswing/concurrency/initial.html
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Prabakar Kalivaradan
Greenhorn
Joined: Dec 12, 2011
Posts: 20
|
|
The exception says index 0 is not accessible. That can occur in the following scenario.
Start looking from osProject.DesignInterface.addJobSpecs(DesignInterface.java:153) method...
|
-prabak
|
 |
Dindy Oreeda
Greenhorn
Joined: May 06, 2011
Posts: 5
|
|
Thanks Guys! I read about it and saw my mistake. Thank you for helping me and guiding me
|
 |
 |
|
|
subject: java.lang.ArrayIndexOutOfBoundsException exception in thread
|
|
|