• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image Maps  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!