Technically, if you want to, you can use JTextAreato achieve this. Instead of writing to the console what you usually write, for example, some information telling the programmer that something was successful or unsuccessful (for troubleshooting, of course), you can use the JTextArea method append()to record what you usually write to the console. Example:
javax.swing.JTextArea guiConsole = new JTextArea(10,10);
System.out.println("This sentence is printed to the real console.");
guiConsole.append("But this one is printed to the GUI Console we made.");
See API for more details.
source
share