Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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