summaryrefslogtreecommitdiff
path: root/javax/swing/text/ComponentView.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/text/ComponentView.java')
-rw-r--r--javax/swing/text/ComponentView.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/javax/swing/text/ComponentView.java b/javax/swing/text/ComponentView.java
index 555120396..8de4de60f 100644
--- a/javax/swing/text/ComponentView.java
+++ b/javax/swing/text/ComponentView.java
@@ -397,7 +397,24 @@ public class ComponentView extends View
{
public void run()
{
- setParentImpl();
+ Document doc = getDocument();
+ try
+ {
+ if (doc instanceof AbstractDocument)
+ ((AbstractDocument) doc).readLock();
+ setParentImpl();
+ Container host = getContainer();
+ if (host != null)
+ {
+ preferenceChanged(null, true, true);
+ host.repaint();
+ }
+ }
+ finally
+ {
+ if (doc instanceof AbstractDocument)
+ ((AbstractDocument) doc).readUnlock();
+ }
}
});
}