title: how to set various row heights for a one JTable
body: <p>I have a JTable which contains a one column, cell render of each table cell is  dynamically generated JPanel therefore each table cell height should be different according to its JPanel, I have tried to change the row height at the place where the jpanel is rendered but it is not working. please tell me how to set different JTable row heights in a JTable,</p>
  
  <p>this is how I tried to do this,</p>
  
  <pre><code>    private QCellPanel renderer = new QCellPanel();
      private QCellPanel editor = new QCellPanel();
  
      @Override
      public Object getCellEditorValue() {
          return editor.getQuestion();
      }
  
      @Override
      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
          renderer.setQuestion((Qusetion) value);
  
          table.setRowHeight(renderer.getPreferredSize().height);
          return renderer;
      }
  
      @Override
      public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
          editor.setQuestion((Qusetion) value);
          table.setRowHeight(editor.getPreferredSize().height);
          return editor;
      }
  </code></pre>