Solved

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

Posted on 2001-06-14
6
1,532 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now