This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The first component should be easy enough using a custom renderer that implements TableCellRenderer. Use a JComboBox as the render component and configure it in the getTableCellRendererComponent method. Make up an editor thay extends DefaultCellEditor and pass in a JComboBox to the constructor. Configure the editor in the getTableCellEditorComponent method. Add an ActionListener to the editor component (JComboBox) and call stopCellEditing in its actionPerformed method. Since you will use this renderer in three of four columns you can set it for the three columns with tableColumnModel.getColumn(n).setCellRenderer(r).
For the second component you could use a TreeTable which is discussed in three articles, found here: Creating TreeTables in Swing Creating TreeTables: Part 2 The Swing HTML Parser. If you are using j2se 1.5+ you will need to make a minor modification to get the code to compile — see Treetable events for suggestion. If this doesn't suit your needs I would make up a custom component with the tree in a scrollPane on the left and the comboBoxes in a panel on the right. Trying to put these together in a JTable looks like a lot of frustration. edit: formatting [ April 25, 2007: Message edited by: Craig Wood ]