title: How to add the HtmlComponent to JasperDesign
body: <p>I managed to add the <code>HtmlComponent</code> to my project through various searches. </p>
  
  <p>My next problem is that I don't have a clue how to add it to a <code>JasperDesign</code>.
  I simply can't find any way to add my <code>HtmlComponent</code> to a <code>JasperDesign</code> (not even through a group etc).</p>
  
  <p>I use Jasper 5.6.1 and managed to get the HtmlComponent jar (5.0.1) out of the iReport tool (5.6.0).</p>
  
  <p>My end purpose is to be able to have an HTML-table inside my report. I know it's not possible in any way, but perhaps, an HTML-component would be the most interesting thing. This way, an image of the table would be in my report, which is ok.</p>
  
  <p><em>This is my current code</em></p>
  
  <pre><code>private JasperDesign getTable(String html, JasperDesign jasperDesign) {
          HtmlComponent table = new HtmlComponent();
          JRDesignExpression expression = new JRDesignExpression();
          expression.setText(html.replace("\n", ""));
          table.setHtmlContentExpression(expression);
          JRDesignGroup group = new JRDesignGroup();
          group.setName(TABLE_GROUP_PREFIX);
          JRDesignBand groupHeader = new JRDesignBand();
          groupHeader.setHeight(200);
          groupHeader.setSplitType(SplitTypeEnum.IMMEDIATE);
          groupHeader.addElement(table);
          ((JRDesignSection)  group.getGroupHeaderSection()).addBand(groupHeader);
  
         return jasperDesign;
  }
  </code></pre>
  
  <p>The line <code>groupHeader.addElement(table)</code> fails because HtmlComponent is not an Element, but a Component.</p>