• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jInternalFrame does not close

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic