This patch was inappropriate.  The appropriate changes should be made in
JTextArea.  I've attached the new patch and will check it in and the
Mauve test case.

2005-09-14  Anthony Balkissoon  <[EMAIL PROTECTED]>

        * javax/swing/JTextArea.java:
        (append): After non-empty append, invalidate.
        (setRows): If number of rows changes, invalidate.
        (setColumns): If number of columns changes, invalidate.

--Tony

On Tue, 2005-09-13 at 16:57 -0400, Anthony Balkissoon wrote:
> My mail server isn't being friendly, sorry if this arrives more than
> once.
> 
> To account for peers' size requirements, Components should be
> invalidated before they are first shown on the screen.  This patch calls
> invalidateTree() when a Window is first shown.
> 
> This fixes bug #23006.
> 
> Patch is pending approval.  Patch is attached.
> 
> 2005-09-13  Anthony Balkissoon  <[EMAIL PROTECTED]>
> 
>         * java/awt/Window.java:
>         (show): Added call to invalidateTree().  If this is the first
> time the 
>         Window is being shown, its Components should be invalidated, to 
>         account for peers' size requirements.
> 
> --Tony
> 
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/JTextArea.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTextArea.java,v
retrieving revision 1.15
diff -u -r1.15 JTextArea.java
--- javax/swing/JTextArea.java	21 Jul 2005 14:59:31 -0000	1.15
+++ javax/swing/JTextArea.java	14 Sep 2005 17:01:01 -0000
@@ -208,6 +208,8 @@
 	      /* This shouldn't happen in theory -- but, if it does...  */
 	      throw new RuntimeException("Unexpected exception occurred.", exception);
 	  }
+      if (toAppend != null && toAppend.length() > 0)
+        invalidate();
   }
 
   /**
@@ -312,8 +314,12 @@
   {
     if (columns < 0)
       throw new IllegalArgumentException();
-
-    this.columns = columns;
+    
+    if (columns != this.columns)
+      {
+        this.columns = columns;
+        invalidate();
+      }
   }
 
   /**
@@ -337,8 +343,12 @@
   {
     if (rows < 0)
       throw new IllegalArgumentException();
-
-    this.rows = rows;
+   
+    if (rows != this.rows)
+      {
+        this.rows = rows;
+        invalidate();
+      }
   }
 
   /**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to