"Roman Thurnherr" <no*****@noemail.noemail> wrote in message news:<3f********@news.swissonline.ch>...
Hi all
I'm using two JLists with the same MouseListener in a JFrame. How can I find
out on which JList the MouseEvent was released?
Is it generally possible or should I use a MouseListener for each JList?
Thanx for your help
Roman
Hi,
Assuming that you have some way of telling which JList is which, like this:
private JList leftList...
private JList rightList...
then you should be able to tell which list received the "up"
event by writing:
public void mouseReleased(MouseEvent e)
{
if (e.getSource() == leftList) ...
else ... // must be rightList
}
--Steve