1 Reply Latest reply: Aug 8, 2011 11:36 AM by 801313 RSS

    JTables inside a JTable

    877202
      Hi,
      I have designed a Table (call it as MainTable) using swing JTable where each cell in this Table is rendered using a JTable(subTable1) with n columns and 1 row and the subTable1'srendering component is also a JTable(subTable2) with n columns and 1 row and this tables... (goes on). The depth of these subTable for a given Cell varies from 0 to n. All the tables have their own TableModel.

      As mentioned the row count of the subtable is always 1 and hence getValueAt and setValueAt functions are always called with rowIndex 1 which is trivial. Instead I need the rowIndex of the mainTable for which this subtable is used as rendering component.

      Does anyone know how this can be done?

      Thanks