Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using a JComboBox as a cell renderer in a JXTreeTable



Au contraire, you can override getCellEditor(int row, int column) in JTable.  Also, your TableCellEditor interface also provides row and column information.

For example:

public class ComboBoxEditor extends TableCellEditor {
        Component getTableCellEditorComponent(JTable table, Object value,
                      boolean isSelected,
                      int row, int column) {
                
                return new JComboBox(getArray(row));
       }
}
        
On 13 Aug 2005, at 21:55, Yvon Thoraval wrote:


Le 13 août 05 à 21:36, Brendon McLean a écrit :

I'm afraid using an editor is the only sensible option.


This doesn't work really for me because the list items into the combo changes versus table row.

as far as i know, it is not possible when used as an editor : all the combos are the same.

What i want to view here is a list of variable items.

then, you think there is no workover ?

Yvon



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >using a JComboBox as a cell renderer in a JXTreeTable (From: Yvon Thoraval <email@hidden>)
 >Re: using a JComboBox as a cell renderer in a JXTreeTable (From: Brendon McLean <email@hidden>)
 >Re: using a JComboBox as a cell renderer in a JXTreeTable (From: Yvon Thoraval <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.