This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

irregular shaped components

 
Scott Presley
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a requirement to build a component resembling a circular pizza. I need to be able to attach a mouse listener to each individual �slice� If the pizza was square, I could simply represent each �slice� as a JPanel, but since the slices aren�t square, a JPanel really doesn�t make sense. Does anyone know if I could extend JComponent to form an irregular (non-square) component?

One additional note... there are more requirements than just mouse listening, so simply tracking the mouse position isn't a viable solution...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this might(?) be worth a look

http://www-128.ibm.com/developerworks/java/library/j-iframe/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic