Hi,
Is there any other way to close a JInternalFrame than dispose() because i want to keep the information that it contains and with dispose it deletes everything.
Thanks
Printable View
Hi,
Is there any other way to close a JInternalFrame than dispose() because i want to keep the information that it contains and with dispose it deletes everything.
Thanks
I'm not sure that dispose() deletes everything, but you certainly can use setVisible(false).
Edit: per the JinternalFrame API, dispose() just "Makes this internal frame invisible, unselected, and closed." There is no mention of deleting or removing information, and that confirms my previous experience with using dispose().
Yes i tried that but if i do set Visible(false) or true it doesnt add it to the DesktopPane that i have. I use this code to show the JInternalFrame
and for closing i useCode:regConteo.setVisible(true);
Portada tmp = (Portada) Main.getInstance().currWindow;
tmp.getDesktop().add(regConteo);
tmp.getDesktop().moveToFront(regConteo);
try {
regConteo.setSelected(true);
} catch (PropertyVetoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thanks for your help.Code:tmp.getDesktop().remove(this);
tmp.getDesktop().moveToFront(tmp.regRecepcion);
try {
tmp.regRecepcion.setSelected(true);
} catch (PropertyVetoException e) {
e.printStackTrace();
}
Hm i have a JTable in that JInternalFrame and when i open it again it doesnt show any of the rows i added i though it was because of that... Ok ill do a bit more of research. Thanks
No problem. If you're still stuck, consider creating and posting an SSCCE.
Moved from New to Java
db