Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jInternalFrame does not close

 
Liwuen Chew
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3159
33
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Liwuen Chew
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic