Re: Using list ( JList ) action...?

Frank Meissner <[email protected]> Thu, 10 Feb 2005 20:49:19 +0100
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Bruno Lima wrote:
> I´d like to add an action in my list component. If i were coding in
> swing, i´d add an addListSelectionListener to my JList. I tryied to do
> something like to my list, but i cant.

Use the "action" attribute for your list. At least for comboboxes, it 
works for me. Because a JList can't be constructed through a 
ListSelectionListener and there is no "setListSelectionListener", you 
cannot specify a LSL in xml. You can write your own descendant of JList 
and a custom converter, though. See the examples for that...

Yours, Frank