Erro Java "Index: 1, Size: 1"

Quando vou fazer um cadastro na tabela, aparece esse erro:

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at br.com.projeto.gui.testeGui2.evento_btnSalvar(testeGui2.java:459)
	at br.com.projeto.gui.testeGui2$2.actionPerformed(testeGui2.java:174)
	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$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.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)

Tenho 2 combobox, o primeiro não apresenta nenhum erro, já no segundo sim.
Código:

if (comboEstado.getSelectedIndex() != 0) {
				estadoBean objEst = new estadoBean();
				objEst.setCodigo(listaCodigoEstados.get(comboEstado.getSelectedIndex()));
				objEst.setNome((String) comboEstado.getItemAt(comboEstado.getSelectedIndex()));				
				cli.setEstado(objEst);
			} else {
				JOptionPane.showMessageDialog(null, "Selecione um Estado", "Mensagem do Sistema", JOptionPane.WARNING_MESSAGE);
				comboEstado.requestFocusInWindow();
				return;
			}
			if (comboCidade.getSelectedIndex() != 0) {
				cidadeBean objCid = new cidadeBean();
				objCid.setCodigo(listaCodigoCidades.get(comboCidade.getSelectedIndex()));
				objCid.setNome((String) comboCidade.getItemAt(comboCidade.getSelectedIndex()));				
				cli.setCidade(objCid);
			} else {
				JOptionPane.showMessageDialog(null, "Selecione uma Cidade", "Mensagem do Sistema", JOptionPane.WARNING_MESSAGE);
				comboCidade.requestFocusInWindow();
				return;
			}

o length do seu array é 1, a posição dele é 0.

vc ta tentando pegar um objeto q nao existe, q tá ultrapassando o tamanho da sua lista.


O que tem nessa linha?

btnSalvar(testeGui2.java:459)

Isso eu to ligado, mas não sei como que vou mudar isso, não sei nem onde esse array foi criado, procurei nos códigos e não encontrei.

tem isso: objCid.setCodigo(listaCodigoCidades.get(comboCidade.getSelectedIndex()));

oq tem dentro da listaCodigoCidades? Provavelmente só tem um item.

listaCodigoCidades.get(comboCidade.getSelectedIndex()));

e vc ta tentando pegar algo q nao existe, a partir de segunda posição.


Quando postar códigos no site, seleciona ele todo e clica em </>

image

Isso facilita a leitura do código