System.out.println to JTextArea

后端 未结 5 1337
庸人自扰
庸人自扰 2020-12-16 06:10

EDIT: I have edited the post to clarify my question, now I myself, have more understanding.

I am essentially, as the title says, attempting to outpu

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 06:43

    You might need to use PipedOutputStream... see the answers to the question here: How to redirect all console output to a Swing JTextArea/JTextPane with the right encoding?

    Basically what this does is, it redirects the System.out to a buffer, from which, the program can read the output printed with System.out. This is called Piping

提交回复
热议问题