--- a/jdk/src/share/classes/java/awt/Container.java Sat Nov 12 04:13:38 2011 +0400
+++ b/jdk/src/share/classes/java/awt/Container.java Wed Nov 16 15:40:59 2011 +0400
@@ -1950,7 +1950,7 @@
*/
public void paint(Graphics g) {
if (isShowing()) {
- synchronized (this) {
+ synchronized (getObjectLock()) {
if (printing) {
if (printingThreads.contains(Thread.currentThread())) {
return;
@@ -2004,7 +2004,7 @@
if (isShowing()) {
Thread t = Thread.currentThread();
try {
- synchronized (this) {
+ synchronized (getObjectLock()) {
if (printingThreads == null) {
printingThreads = new HashSet();
}
@@ -2013,7 +2013,7 @@
}
super.print(g); // By default, Component.print() calls paint()
} finally {
- synchronized (this) {
+ synchronized (getObjectLock()) {
printingThreads.remove(t);
printing = !printingThreads.isEmpty();
}