code: public Component addDetailComponent(TableModel model, Object aValue, int iRowIndex, int iColumnIndex, GridBagConstraints c)
      {
          JComponent component = null;
          String string = "";
          if (aValue instanceof ImageIcon)
          {
              component = new JLabel((ImageIcon)aValue);
          }
          if (aValue instanceof PortableImage)
          {
              component = new JLabel(new ImageIcon((Image)((PortableImage)aValue).getImage()));
          }
          else if (aValue != null)
          {
              string = aValue.toString();
              if (model.isCellEditable(iRowIndex, iColumnIndex))
              {
                  if (string.length() == 0)
                      component = new JTextField(3);
                  else
                      component = new JTextField(string);
              }
              else
                  component = new JLabel(string);
          }
          return component;
      }
docs: Create the appropriate component and add it to the grid detail at this location.
  @param model The table model to read through.
  @param iRowIndex The row to add this item.
  @param iColumnIndex The column index of this component.
  @param c The constraint to use.