title: contents of textarea to the printer
body: <p>I am able to easily print the contents of a JTable mainly through using the statement below.  However, this does not work for printing the contents of a textarea component.  Is there a simple way of printing the contents of a textarea component?  I've seen some pretty confusing examples on the web that use multiple classes.  But I'm trying to find a simpler way of doing this.</p>
  
  <p>I ADDED THE SECOND AREA OF CODE ABOUT 24 HOURS AFTER THE ORIGINAL POST.  NOTE THAT IT SEEMS TO BE PROMISING BUT PRODUCES THE ERROR "ADD ARGUMENT TO MATCH PRINT(GRAPHICS)".  HOW CAN THAT CODE BE FIXED?</p>
  
  <pre><code>table.print(JTable.PrintMode.NORMAL, header, footer);
  
  
  
  
  JButton btnNewButton_7 = new JButton("Print");
      btnNewButton_7.addActionListener(new ActionListener() {
      @Override
          public void actionPerformed(ActionEvent arg0) {  
  
          try{
              boolean complete = textArea_2.print();
              //The above line reads the error "Add argument to match print(Graphics)"
              if(complete){
                  JOptionPane.showMessageDialog(null,  "Printjob Finished", "Report",
                          JOptionPane.INFORMATION_MESSAGE);
              }else{
                  JOptionPane.showMessageDialog(null, "Printing", "Printer", JOptionPane.ERROR_MESSAGE);
                  }
              }catch(PrinterException e){JOptionPane.showMessageDialog(null, e);
              }
  
  
  
          }
  
      });
  </code></pre>