This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Click On Image. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Click On Image." Watch "Click On Image." New topic

Click On Image.

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
I just want to insert an Image in a Frame and perform some function by clicking some specific part of the image.
Like if my image has two labels,I want to perform two different function by clicking on these two label.

Regards<br />P Jain
Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138

Can you give more details about how you insert an Image in a Frame? by setIcon to JLabel, or by overriding the repaint() method of JLabel?

Download Java GUI Builder, <a href="" target="_blank" rel="nofollow"></a>
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535

[ August 29, 2004: Message edited by: Craig Wood ]
I agree. Here's the link:
subject: Click On Image.