Class TextViewer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class TextViewer extends JTextArea
A component which presents textual data in a monospaced font.
See Also:
  • Constructor Details

    • TextViewer

      public TextViewer()
      Creates an empty text viewer panel. Use the append method to write lines to it.
    • TextViewer

      public TextViewer(Source xsrc)
      Displays a javax.xml.transform.Source.
    • TextViewer

      public TextViewer(Reader rdr)
      Displays the text obtained from a Reader.
    • TextViewer

      public TextViewer(InputStream strm)
      Displays the text returned from an InputStream.
    • TextViewer

      public TextViewer(Iterator it)
      Displays the strings iterated over by an Iterator. The strings are not expected to contain carriage return characters.
      Throws:
      ClassCastException - if any of the objects iterated over is not a String
    • TextViewer

      public TextViewer(Throwable th)
      Displays the stacktrace of a given Throwable in a text viewer window.
      Parameters:
      th - the Throwable to print the stack trace of
  • Method Details

    • getAppender

      public Writer getAppender()
      Returns a Writer object; any thing you write into it will appera in the TextViewer.
      Returns:
      a writer that writes into this viewer