David,
When you say that you want to "install" a JComboBox in a JTable, I assume you mean that you want to use a JComboBox as a renderer or as an editor for certain cells, but not for all cells in a given column or group of columns. Is that correct?
If so, the easiest way to do this is create a simple JTable subclass that will create an instance of the renderer or editor and return it only for the specific (cells) that you want it used for. For example, the following JTable subclass will only use "myEditor" for the cell in the sixth column of the fourth row:
In other words, it's the JTable's getCellEditor(int, int) method that determines which editor is used for a particular cell, and by overriding this method, you can control which specific cells an editor is used for. Of course, I just used the sixth column / fourth row check as a simple example of how this works, and
you should replace it with code that makes sense for your application. However, hopefully this gives you an idea of how to get started doing that.
P.S. You can do essentially the same thing for renderers by overriding the getCellRenderer(int, int) method.
------------------
Brett Spell
Author,
Professional Java Programming