提交 7f9168e7 编写于 作者: A alexp

6826074: JScrollPane does not revalidate the component hierarchy after scrolling

Reviewed-by: anthony
上级 a4ddbeef
......@@ -174,6 +174,8 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab
if(!wasIcon(f)) {
Rectangle r = getBoundsForIconOf(f);
desktopIcon.setBounds(r.x, r.y, r.width, r.height);
// we must validate the hierarchy to not break the hw/lw mixing
desktopIcon.revalidate();
setWasIcon(f, Boolean.TRUE);
}
......@@ -453,11 +455,9 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab
/** This moves the <code>JComponent</code> and repaints the damaged areas. */
public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) {
boolean didResize = (f.getWidth() != newWidth || f.getHeight() != newHeight);
f.setBounds(newX, newY, newWidth, newHeight);
if(didResize) {
f.validate();
}
// we must validate the hierarchy to not break the hw/lw mixing
f.revalidate();
}
/** Convenience method to remove the desktopIcon of <b>f</b> is necessary. */
......
......@@ -1111,6 +1111,8 @@ public class JViewport extends JComponent implements Accessible
view.setLocation(newX, newY);
repaintAll = false;
}
// we must validate the hierarchy to not break the hw/lw mixing
revalidate();
fireStateChanged();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册