• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image Maps

 
Josh Sandeman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using swing components like JLabels that can include an image (Icon), is it possible to define regions within that image that can be individually targeted for mouse events? The motivation here is that images are always rectangular, but the image of a button should only show its pop-up or fire its events when clicked in the circular region defined by the button image.

Thanks,
Josh
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Josh Sandeman
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, thank you, thank you.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!