🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11617

JInternalFrame DO_NOTHING_ON_CLOSE

#11617
From: Eelco Hillenius
Date: Wed, 28 Apr 1999 00:00
32 lines
1972 bytes
Hi,

I'm using JInternalFrames on a JDesktopPane. The internal frames are
closable (I want the user to see the 'x'), but I realy want to just
setVisible(false) on them when a user clicks the close-icon. I've tried
.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE), in the
classdefinition and after the internal frame was created by the owner;
neither does work - the reference is lost. I don't get it... I also tried to
overrule the method dispose in the JInternalFrames, but it all makes no
difference.

Does anyone know how to do this properly?

The reason why I want to do is this: I'm working on a commercial
application - already rolled out! - with different internal frames for
different (database-related) tasks. The way I have build the application is
that an instance of an internal frame is created only when the user selects
the function for that internal frame. The users of my application switch
from functions quite often. The problem is that Java's garbage collection
trails with a great distance after the user-actions, and memory is getting
fuller and fuller. When I load all frames in the beginning my application
takes about 20MB of memory. In the manner the application runs right now, it
grows to 40 to sometimes 80(!) MB of memory.

Any suggestions on this?

Thanks in advance,

Eelco Hillenius

Software Engineer
Blue Point Designware
Technical Details
Message-ID: <925312626.562588@tbird.introweb.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9ef032d679fe3091,start
X-Google-Attributes: gid111d45,public
From: "Eelco Hillenius" <illy@cybercomm.nl>
Subject: JInternalFrame DO_NOTHING_ON_CLOSE
Date: 1999/04/28
Message-ID: <925312626.562588@tbird.introweb.nl>
X-Deja-AN: 471907112
Cache-Post-Path: tbird.introweb.nl!unknown@ip51-47.introweb.nl
Organization: IntroWeb Newsserver
X-Cache: nntpcache 2.3.2 (see http://www.nntpcache.org/)
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Newsgroups: borland.public.jbuilder.java.swing