Originally posted by Akansha Kumar:
I have a swing based application.Here there is JPanel in which there is a JTable , table1 with n rows and 1 column. Each cell of table1 contains another JPanel.
JTables can't really
contain components such as JPanels. They contain values which, when needed, are painted by cell renderers.
At best you can set up cell renderers (and cell editors) to give the
illusion that the table cells contain panels. (This is also what's going on when JTable cell appear to contain JComboBoxes or JCheckBoxes.) It sounds like you might be better off not using JTable.