Reputation: 449
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.
Upvotes: 1
Views: 4858
Reputation: 11
But remember that for the jInternalFrame.setclosed(true); you must surround this in a try-catch. This will normally be suggested if you are using an IDE
try {
jInternalFrame.setClosed(true);
} catch (PropertyVetoException ex) {
System.err.println("Closing Exception");
}
hope this helps
Upvotes: 0
Reputation: 14637
You have to call setClosed(), as specified in the doc:
jinternalFrame.setClosed(true)
Upvotes: 5