title: Display output from a method on a JPanel in Java
body: <p>I have a GUI the gets an input from a text area and on the click of button produces a report. The report is supposed to be displayed below the input area. On the click of the button, the input data are passed to a a void method called Calculate(), and right now the correct results are displayed on the console by System.out.printf(). How can I redirect this output to the report area?</p>
  
  <pre><code>public class Progress extends JFrame
  {
     JTextArea input;
     JButton calculate;
     JPanel report;
  
     public void Notify()
       {
           calculate = new JButton("Calculate");
          calculate.addActionListener(new ActionListener() {
  
              @Override
              public void actionPerformed(ActionEvent e) {
                  // TODO Auto-generated method stub
                  Calculate();
              }
          });
       }
  }
  
  ...
  
  public void Calculate()
      {
          GenerateReport m = new GenerateReport();
          m.Parsecsv(input.getText());
  
      }
  </code></pre>
  
  <p>So, as a newbie to Java, I wanted to know how I can redirect the output of my Calculate() method to the report panel?</p>