This is a simple example to redirect your console output to JTextArea in Swing/Java

	public static void SetConsole(JTextArea console) 
	{
		try {
			final PrintStream out = new PrintStream(
					new RedirectOutputStream(console),
					true, "UTF-8");
			System.setOut(out);
                        /*System.setErr(out);*/  /*Only Error System.err.println */
		} catch (final UnsupportedEncodingException e) {
			System.out.println(e.getMessage());
		}		
	}

Share +
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • Netvibes
  • Reddit
  • StumbleUpon
  • Technorati
  • MySpace
  • TwitThis