MouseClick event for imageIcons
1 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Wednesday, December 19, 2001 02:16 AM

I am displaying the same imageIcon at different locations.On doubleclicking on the icons, information relative to that particular location has to be displayed in another window. Can anyone tell me how to do this?

Re: MouseClick event for imageIcons

Posted By:   m_k  
Posted On:   Thursday, December 20, 2001 05:15 AM

Are you putting your ImageIcon onto something like a JButton or a JLabel? I would probably put it on a JLabel and add a MouseListener. That would be the easiest way to do it. There are lots of examples available on how to set up a Mouse Listener for a dble click.

Java tutorial on using Icons

About | Sitemap | Contact