Search code examples
javaswingjinternalframe

How to close Internal Frames?


I had placed several internal frames in a desktop pane namely

JInternalFrame frameint1 = new JInternalFrame("Question 1", true,true, true, true);

I was able to maximize and minimize but I was not able to close the internal frame. Please help me.


Solution

  • You have to call setClosed(), as specified in the doc:

    jinternalFrame.setClosed(true)