Skip to main content

ArrayIndexOutOfBoundsException

2 replies [Last post]
gramar82
Offline
Joined: 2009-02-17

Hi,

i get this exception in my java application:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 4 >= 4
at java.util.Vector.elementAt(Unknown Source)
at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
at javax.swing.JTable.getCellRenderer(Unknown Source)
at org.jdesktop.swingx.JXTable.getCellRenderer(JXTable.java:3535)

I execute following statements when this exeption were throwing:

(DefaultTabelCellRenderer)table.getCellRenderer(row, column);

It is a bug or i was making something wrong?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bbrtki
Offline
Joined: 2009-07-08

Columns start at zero iirc.
So, it looks like you're asking for column 4 (meaning the 5th column) while you only have 4 (0,1,2,3) in the model.

gramar82
Offline
Joined: 2009-02-17

Thanx.