8211703: JInternalFrame : java.lang.AssertionError: cannot find the internal frame

Reviewed-by: prr, serb
This commit is contained in:
Prasanta Sadhukhan 2019-05-23 10:50:47 +05:30
parent f7e4fb87b2
commit 1f138e1009
2 changed files with 9 additions and 1 deletions

View File

@ -1471,7 +1471,14 @@ class Metacity implements SynthConstants {
JComponent comp = context.getComponent();
JComponent titlePane = findChild(comp, "InternalFrame.northPane");
JInternalFrame jif = findInternalFrame(comp);
JInternalFrame jif;
if (comp instanceof JButton) {
JComponent bTitlePane = (JComponent)comp.getParent();
Container titlePaneParent = bTitlePane.getParent();
jif = findInternalFrame(titlePaneParent);
} else {
jif = findInternalFrame(comp);
}
if (jif == null) {
return;
}

View File

@ -64,6 +64,7 @@ import com.sun.swingset3.demos.internalframe.InternalFrameDemo;
/*
* @test
* @bug 8211703
* @key headful
* @summary Verifies SwingSet3 InternalFrameDemo page by checking the different
* actions on the parent frame, internal frame and creating internal frame