Using a JComboBox in certain cells in a JTable
- From: "Leif Bloomquist" <spam@xxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 12:51:20 -0400
Hi all,
Using the techniques from the following page, I've set up a JTable with
JComboBoxes in one column of cells.
http://javaalmanac.com/egs/javax.swing.table/ComboBox.html
However, what I'd really like to do is have a JComboBox as the editor/render
for only certain cells in the column, not the entire column. I found a
verbal solution here:
https://lists.xcf.berkeley.edu/lists/advanced-java/2000-March/007761.html
So I get what they're saying - check the row that is currently being
edited/rendered, and return either a JComboBox for those rows, or a "normal"
JTable cell. (Is it a JTextField?) But I'm a bit fuzzy on where/when I
should actually put in the code that does this. Can anyone help or provide
a short example?
Thanks,
Leif
--
Leif Bloomquist
leif (at) schema factor (dot) com
http://home.ica.net/~leifb/
.
- Follow-Ups:
- Re: Using a JComboBox in certain cells in a JTable
- From: Vova Reznik
- Re: Using a JComboBox in certain cells in a JTable
- From: Thomas Fritsch
- Re: Using a JComboBox in certain cells in a JTable
- Prev by Date: Re: Always on top JDialog or JWindow
- Next by Date: Re: Using a JComboBox in certain cells in a JTable
- Previous by thread: Painting a Stack with Swing
- Next by thread: Re: Using a JComboBox in certain cells in a JTable
- Index(es):
Relevant Pages
|
|