Skip to content

Commit 147c36a

Browse files
committed
typo causing tabbed pane to clip incorrectly. "this"->"c"
1 parent c7fc88f commit 147c36a

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

sources/net.sf.j2s.java.core/src/javax/swing/JComponent.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4354,25 +4354,24 @@ public void paintImmediately(int x, int y, int w, int h) {
43544354
return;
43554355
}
43564356

4357-
while (!isOpaque()) {//see TextAnalyzer2 -- doesn't erase canvas on hide && ((JSComponent)c).秘paintsSelf()) {
4358-
parent = c.getParent();
4359-
if (parent != null) {
4360-
x += c.getX();
4361-
y += c.getY();
4362-
c = parent;
4363-
} else {
4364-
break;
4365-
}
4366-
4367-
if (!(c instanceof JComponent)) {
4368-
break;
4369-
}
4370-
}
4371-
if (c instanceof JComponent) {
4372-
((JComponent) c)._paintImmediately(x, y, w, h);
4373-
} else {
4374-
c.repaint(x, y, w, h);
4375-
}
4357+
// Get back to first opaque self or parent so as to draw the background and all parts in between, in order.
4358+
while (!c.isOpaque() && (parent = c.getParent()) != null) {//see TextAnalyzer2 -- doesn't erase canvas on hide && ((JSComponent)c).秘paintsSelf()) {
4359+
x += c.getX();
4360+
y += c.getY();
4361+
c = parent;
4362+
}
4363+
((JComponent) c)._paintImmediately(x, y, w, h);
4364+
4365+
// SwingJS everything is a JComponent
4366+
// if (!(c instanceof JComponent)) {
4367+
// break;
4368+
// }
4369+
// }
4370+
// if (c instanceof JComponent) {
4371+
// ((JComponent) c)._paintImmediately(x, y, w, h);
4372+
// } else {
4373+
// c.repaint(x, y, w, h);
4374+
// }
43764375
}
43774376

43784377
/**

0 commit comments

Comments
 (0)