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. The JPanel again contains JTable table2. The problem is after cell rendering the JTables table1 and table2 are visible but are disabled. I mean the scroll doesn't work...the editing functionalituy isn't wroking. Is there any solution to this,?
Is there anyway you can provide a stripped down version of your code that we can execute and play around with so we can duplicate? Aside from that it sounds like horrible UXP to me. What are you trying to do. Maybe there is a better solution.
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.