How is it possible?

How is it possible when an entry from the JList component is selected, I want to populate the JTextField component with what was selected in JList component? I did addListSelectionListener to the list,

...

PList.addListSelectionListener(new PSelectionListener());

...

What could've gone wrong here?

[344 byte] By [tnr009] at [2007-9-26 4:40:57]
# 1
Hi,does the PSelectionListener get anything?JRG
j-rg at 2007-6-29 18:02:55 > top of Java-index,Archived Forums,Swing...
# 2
So far, No.
tnr009 at 2007-6-29 18:02:55 > top of Java-index,Archived Forums,Swing...
# 3

> How is it possible when an entry from the JList

> component is selected, I want to populate the

> JTextField component with what was selected in JList

> component? I did addListSelectionListener to the

> list,

> ...

> PList.addListSelectionListener(new

> PSelectionListener());

> ...

>

> What could've gone wrong here?

>

Looking at this source code... can you tell me in which source code will the ListSelectionEvent event will be deal with?... You must have

SomeCustomListenerClass MylistenerForThatJList = new SomeCustomListenerClass()

PList.addListSelectionListener(MylistenerForThatJList);

and have a source code for the SomeCustomListenerClass....in which the event will be deal with...

JRG

j-rg at 2007-6-29 18:02:55 > top of Java-index,Archived Forums,Swing...