Skip to content

Commit 225d1d9

Browse files
hansonrhansonr
authored andcommitted
prevent revalidation unless JLabel paints self
1 parent 1ae883a commit 225d1d9

File tree

1 file changed

+3
-2
lines changed
  • sources/net.sf.j2s.java.core/src/javax/swing

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ public void setText(String text) {
289289
// oldAccessibleName,
290290
// accessibleContext.getAccessibleName());
291291
// }
292-
if (text == null || oldValue == null || !text.equals(oldValue)) {
293-
revalidate();
292+
if (秘paintsSelf())
293+
if (text == null || oldValue == null || !text.equals(oldValue)) {
294+
revalidate();
294295
秘repaint();
295296
}
296297
}

0 commit comments

Comments
 (0)