When I close the jinternalframe it's selected jcombobox data and data added textfeilds stays where it was when it was closing(not saving).
This is my closing source code:
private void formInternalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
try {
if (no != null) {
int confirmed = JOptionPane.showConfirmDialog(null,
"Are you sure you want to exit the program?",
"Exit Program Message Box",
JOptionPane.YES_NO_OPTION);
if (confirmed == JOptionPane.YES_OPTION) {
this.dispose();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
I can't show image but when I'm opening that pre-closed jinternalframe again every selected data are same on new jinternalfrmae too.
I tried this code before. but when I clicked closeing button jinternalframe is not even closing. This is the old code:
NewOrder no;
try {
if (no != null) {
int confirmed = JOptionPane.showConfirmDialog(null,
"Are you sure you want to exit the program?",
"Exit Program Message Box",
JOptionPane.YES_NO_OPTION);
if (confirmed == JOptionPane.YES_OPTION) {
this.dispose();
}
}
} catch (Exception e) {
e.printStackTrace();
}
This is not even working.. Please help. If you need more explanation please ask.
Edited problem again.
Lets say I filled name and address in internalframe and I closed it with out saving any data.. And if I opened it again those entered data will be there. I use to close the jinternalframe by given first source code. Second source code is not even working..