aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes irregular shaped components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "irregular shaped components" Watch "irregular shaped components" New topic
Author

irregular shaped components

Scott Presley
Greenhorn

Joined: Apr 15, 2003
Posts: 25
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

Joined: Jun 09, 2003
Posts: 4632
this might(?) be worth a look

http://www-128.ibm.com/developerworks/java/library/j-iframe/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: irregular shaped components