> I am trying to render the single cell of the JTable
> with the another JTable. so that it gives look & feel of
> cascaded tables (as in MS excel or word)
This CellRenderer should do the trick:
public class ComponentRenderer implements TableCellRenderer {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if( value instanceof Component )
return (Component)value;
return new JLabel(value.toString());
}
}
Register it at your table-containing table with
setDefaultCellRenderer(Object.class, new ComponentRenderer())
and you're clean.