posted 22 years ago
Hi laoniu,
Dispose will immediately free up the memory used by the frame and its resources. It will also be immediately removed from the display, i.e., setVisible( false ).
Garbage collection can't be forced or even guaranteed to run during your programs execution.
Therefore, if you know you won't need a frame anymore then you can just dispose of it and it will disappear and be removed from memory!
Regards,
Manfred.