?
Solved

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

Posted on 2001-06-14
6
Medium Priority
?
1,686 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 400 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

777 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