wood burning stoves 2.0*
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


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jInternalFrame does not close" Watch "jInternalFrame does not close" New topic
Author

jInternalFrame does not close

Liwuen Chew
Greenhorn

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: 3071
    
  33

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_ON_CLOSE
Do nothing. This requires the program to handle the operation in the windowClosing method of a registered InternalFrameListener object.
HIDE_ON_CLOSE
Automatically make the internal frame invisible.
DISPOSE_ON_CLOSE
Automatically dispose of the internal frame.


Mohamed Sanaulla | My Blog
Liwuen Chew
Greenhorn

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!
Thanks!
 
GeeCON Prague 2014
 
subject: jInternalFrame does not close