Java JTextArea printStackTrace(Exception e, JTextArea console)

Here you can find the source of printStackTrace(Exception e, JTextArea console)

Description

print Stack Trace

License

Open Source License

Declaration

public static void printStackTrace(Exception e, JTextArea console) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

import java.io.PrintWriter;
import java.io.StringWriter;

public class Main {
    public static void printStackTrace(Exception e, JTextArea console) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);//from w  w w  .j a  v  a2s. c  om
        console.append(pw.toString());
    }
}

Related

  1. out(final JTextArea ta)
  2. preventInputingNewLineOnTextArea(JTextArea txe, AbstractAction actionOnEnter)
  3. printExceptionInfo(Exception e, JTextArea console)
  4. printInfo(JTextArea txtInfo, String infoString)
  5. printInTextArea(JTextArea log, String[] toPrint)
  6. printStream(final JTextArea ta)
  7. registerUndoManager(JTextArea textArea)
  8. setCaretPosition(int i, int j, JTextArea jtextarea)
  9. setCaretPosition(JTextArea ta)