Solved

How to close(dispose/free memory) all JInternalFrame in a JDesktopPane?

Posted on 2001-06-14
6
1,607 Views
Last Modified: 2007-12-19
 I use DesktopManager.closeFrame(JInternalFrame) to close all the JInternalFrame in the JDesktopPane. It does work! But the problem I met is that the memory isn't released(I use the statement "java -verbosegc myclass" to debug). Please tell me what is the problem?? Thank you.

Attn :
JInternalFrame frames[] = MyDesktopPane.getAllFrames();
DesktopManager dm = MyDesktopPane.getDesktopManager();
for (int i = 0 ; i < frames.length ; i ++)
{
  dm.closeFrame(frames[i]);
  frames[i].setClosed(false);
}
0
Comment
Question by:akokchai
  • 4
  • 2
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6189981
Sounds like it's related to the following bugs:
http://developer.java.sun.com/developer/bugParade/bugs/4257083.html
http://developer.java.sun.com/developer/bugParade/bugs/4177795.html

I think a workaround is to remove the frames from the desktop, but not positive. Have a browse of the bug report comments and see what you can find.


0
 
LVL 92

Expert Comment

by:objects
ID: 6189983
Almost forgot, it's supposed to be fixed in 1.4. So you could try that.
0
 
LVL 1

Author Comment

by:akokchai
ID: 6190237
 Hello objects, thank you for telling me the bugs. I browse the www.javasoft.com and I can't find any link to download JDK1.4 . Do you have any url or somewhere for me to download it.. Thank you.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 6190264
I think it's hidden away a bit cause it's still in beta :)
http://java.sun.com/j2se/1.4/

mick
0
 
LVL 1

Author Comment

by:akokchai
ID: 6193747
 Nice to meet you, objects. Your nickname is quite good! Hope to be friend with you. My ICQ No is 33072364. Thank for your help.
0
 
LVL 92

Expert Comment

by:objects
ID: 6193784
Thanks for the points :)

mick
http://www.objects.com.au/staff/mick
ICQ# 61582730
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question