Skip to content

Commit cdc875d

Browse files
hansonrhansonr
authored andcommitted
Must invalidate even if not visible after a text change
- the update to the CSS comes via Component.setBounds, so just setting the UI to isTainted=true is not enough. - Wolfgang Christian DELTA_N bug in checkbox for ejs ThreeStateNuclearDecay simulation.
1 parent 9a4b9fe commit cdc875d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4236,7 +4236,7 @@ public void revalidate() {
42364236
// internal structural change.
42374237
if (ui != null)
42384238
((JSComponentUI)ui).setTainted();
4239-
if (getParent() == null && !isValidateRoot() || !秘isTopLevelVisible()) {
4239+
if (getParent() == null && !isValidateRoot()) {
42404240
// Note: We don't bother invalidating here as once added
42414241
// to a valid parent invalidate will be invoked (addImpl
42424242
// invokes addNotify which will invoke invalidate on the
@@ -4245,6 +4245,10 @@ public void revalidate() {
42454245
// which was causing some people grief.
42464246
return;
42474247
}
4248+
if (!秘isTopLevelVisible()) {
4249+
invalidate();
4250+
return;
4251+
}
42484252
if (SwingUtilities.isEventDispatchThread()) {
42494253
invalidate();
42504254
// problem here was that AWT labels were automatically resizing when painted

0 commit comments

Comments
 (0)