Index: javax/swing/text/DefaultCaret.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultCaret.java,v retrieving revision 1.15 diff -u -r1.15 DefaultCaret.java --- javax/swing/text/DefaultCaret.java 30 Sep 2005 19:54:18 -0000 1.15 +++ javax/swing/text/DefaultCaret.java 4 Oct 2005 15:12:40 -0000 @@ -470,10 +470,7 @@ */ protected final void repaint() { - // FIXME: Is this good? This possibly causes alot of the component - // hierarchy to be repainted on every caret blink. - if (textComponent != null) - textComponent.repaint(); + textComponent.repaint(this); } /** @@ -668,8 +665,11 @@ */ public void setVisible(boolean v) { - visible = v; - repaint(); + if (v != visible) + { + visible = v; + repaint(); + } } /**