this.setLayout(new BorderLayout()); this.add("Center", result);
ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(out); try { System.setOut(ps); System.out.println("OK"); result.setText("OK"); } catch (Exception e) { result.setText(e.toString()); }