How can I achive multiple column display in a JCombobox?

Sandip Chitale

Use JTable a the CellRenderer/CellEditor.

For example look at the JTreeTable example at the SwingConnection for how a JTree is used as a TableCellRenderer for the JTable to create a TreeTable.


Similarly look at the sample SwingSet program sourcecode. It is bundled with the JDK1.2 under demo/jfc/SwingSet/src directory. There you will find an example (TreeCombo.java) which uses a TreeTableModel and a combination of JLabel + indent border to give an impression of a tree in the dropdown.