usr/src/java/util/org/opensolaris/os/vp/util/swing/ThrowableEditorPane.java
changeset 685 767674b0a2fb
parent 219 57841c113efe
equal deleted inserted replaced
684:f7b1d1fbdb8e 685:767674b0a2fb
    18  *
    18  *
    19  * CDDL HEADER END
    19  * CDDL HEADER END
    20  */
    20  */
    21 
    21 
    22 /*
    22 /*
    23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
    23  * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
    24  * Use is subject to license terms.
       
    25  */
    24  */
    26 
    25 
    27 package org.opensolaris.os.vp.util.swing;
    26 package org.opensolaris.os.vp.util.swing;
    28 
    27 
    29 import javax.swing.JEditorPane;
    28 import javax.swing.JEditorPane;
    80      *		    ThrowableEditorPane}
    79      *		    ThrowableEditorPane}
    81      */
    80      */
    82     public void setThrowable(Throwable throwable) {
    81     public void setThrowable(Throwable throwable) {
    83 	this.throwable = throwable;
    82 	this.throwable = throwable;
    84 
    83 
    85 	StringBuffer buffer = new StringBuffer();
    84 	StringBuilder buffer = new StringBuilder();
    86 
    85 
    87 	while (throwable != null) {
    86 	while (throwable != null) {
    88 	    buffer.append("<b>").append(
    87 	    buffer.append("<b>").append(
    89 		TextUtil.escapeHTMLChars(throwable.getClass().getName())).
    88 		TextUtil.escapeHTMLChars(throwable.getClass().getName())).
    90 		append("</b><br/><table><tr><td>&nbsp;&nbsp</td><td>");
    89 		append("</b><br/><table><tr><td>&nbsp;&nbsp</td><td>");