Help with serialization in java

0

I have in the main method:

cargarDatos() : It is responsible for entering data from a .dat file.

Ventana v=new Ventana() : It is responsible for opening a window with which you enter data. It ends with a defaultCloseOperation: close_on_exit .

guardarDatos() : is responsible for saving the data you have entered in the window and saves it in a .dat file.

The problem is that the program does not get to execute the last line because when it closes the window the execution ends. What can I do?

    
asked by hugoboss 19.05.2017 в 20:01
source

1 answer

0

Imagining your code, I suppose that if you change the defaultCloseOperation attribute to: dispose_on_close you will avoid cutting the program too soon.

    
answered by 25.05.2017 в 07:12