File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes jInternalFrame does not close Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jInternalFrame does not close" Watch "jInternalFrame does not close" New topic

jInternalFrame does not close

Liwuen Chew

Joined: Mar 11, 2010
Posts: 24
Hi! I made a jFrame class, but after I made it I converted it into a jInternalFrame class (Deleted the main and extended to jInternalFrame instead of jFrame).
lso I added the code

to my new jInternalFrame. When I add it to a jDesktopPane, the internal frame appears just fine with the minimize, maximize and close buttons at the top.

My problem is that only the minimize and maximize work, but if I do click the close button, it does not close the little window. Can anybody help me please? Thanks!
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3152

Please have a look at the JInternalFrame

Javadoc wrote:Sets the operation that will happen by default when the user initiates a "close" on this internal frame. The possible choices are:

Do nothing. This requires the program to handle the operation in the windowClosing method of a registered InternalFrameListener object.
Automatically make the internal frame invisible.
Automatically dispose of the internal frame.

Mohamed Sanaulla | My Blog
Liwuen Chew

Joined: Mar 11, 2010
Posts: 24
Hey it worked!
Because it was a jFrame that was converted to a jInternalFrame, there was this line of code

I removed it and it worked just fine!
I agree. Here's the link:
subject: jInternalFrame does not close
It's not a secret anymore!