I am doing a program where the user will give his number and countable and his name, however he does not run and an error appears saying: incompatible types required: int found: String
What am I doing wrong in my code?
import javax.swing.JOptionPane;
public class Capturas{
public static void main(String[]args){
String[]nombre=new String[5];
String auxnombre;
int[]num=new int[5];
int opcionmenu=0;
int capture1;
int ejecutar=0;
int auxnum=0;
int casillas=0;
int x=0;
int error;
int otro=0;
int yaesta=0;
int renglon;
do
{
opcionmenu=JOptionPane.showInputDialog("Ingresa la opcion deseada: \n 1.Captura \n 2.Consulta \n 3.Cambios \n 4.Cancelaciones \n 5.Reinstalacion \n 6.Salida");
if(opcionmenu==1)
{
if(casillas<4)
{
yaesta=0;
auxnum=Integer.parseInt(auxnum=JoptionPane.showInputDialog("Ingresa el numero contable"));
for(x=1; x<=4; x++)
{
if(auxnum==num[x])
{
yaesta=1;
}
}
if(yaesta==1)
{
JOptionPane.showMessageDialog(null, "El numero ya esta registrado");
}
if(yaesta==0)
{
renglon=0;
for(x=1; x<=4; x++)
{
if(nombre[x]!=null)
{
renglon=renglon+1;
}
}
renglon=renglon+1;
num[renglon]=auxnum;
nombre[renglon]=auxnum;
nombre[renglon]=JOptionPane.showInputDialog("Ingresa el Nombre");
casillas=casillas+1;
}
}
}
}
while(opcion!=6);
}
}