logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw LogPanel.java
Date Wed, 14 Apr 2004 05:54:30 GMT
sdeboy      2004/04/13 22:54:30

  Modified:    src/java/org/apache/log4j/chainsaw LogPanel.java
  Log:
  Prevent layout exceptions when trying to set the caret position on a detail pane with an
empty string.
  
  Revision  Changes    Path
  1.65      +3 -1      logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java
  
  Index: LogPanel.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- LogPanel.java	8 Apr 2004 07:12:21 -0000	1.64
  +++ LogPanel.java	14 Apr 2004 05:54:30 -0000	1.65
  @@ -2588,7 +2588,9 @@
           new Runnable() {
             public void run() {
               detail.setText(text2);
  -            detail.setCaretPosition(0);
  +            if (text2.length() > 0) {
  +                detail.setCaretPosition(0);
  +            }
             }
           });
           detail.revalidate();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message