Solved

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

Posted on 2001-06-14
6
1,662 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

724 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