I'm getting an error and I do not understand where I have it, it says it is when importing the file however after reviewing everything I still do not understand.
java.lang.NumberFormatException: null
This is the method to load interface info:
public void cargarInfo ()
{
JFileChooser archivo = new JFileChooser("./data");
archivo.setDialogTitle("Escoger Dificultad");
int resultado = archivo.showOpenDialog(this);
if(resultado == JFileChooser.APPROVE_OPTION);
{
cueva=null;
panelTablero.removeAll();
panelTablero.revalidate();
panelTablero.repaint();
archivoNivel = archivo.getSelectedFile( );
}
try
{
cueva=new Cueva(archivoNivel);
//panelControles.refrescar();
panelTablero.setSize(ancho,alto);
panelTablero.inicializar(cueva.darFilas(),cueva.darColumnas(),cueva.darBitmap());
//panelTablero.iluminar();
int ancho = (darCueva().darColumnas()*51);
int alto=(darCueva().darFilas()*52);
int anchoP=ancho+228;
int altoP=alto+235;
setSize(anchoP,altoP);
validate();
repaint();
}
catch(Exception e)
{
e.printStackTrace();
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
And this is the world:
public Cueva(File archivo) throws Exception
{
Properties datos = cargarInfo(archivo);
String numeroFilas1 = datos.getProperty( "filas" );
filas = Integer.parseInt( numeroFilas1 );
String columnas1 = datos.getProperty( "columnas" );
columnas = Integer.parseInt( columnas1 );
inicializar(datos);
}