I am trying to display a circular object in my gui, the circular object should contain a few labels therefore I thought the circle object should extend JPanel. Does anyone know how to make a circular JPanel? Or at least a JPanel which paints an oval and places a few JLables in the centre of the oval?
Thanks
To paint a circle, subclass
JPaneland overridepaintComponent:Looks like this:
alt text http://img246.imageshack.us/img246/3708/so2343233.png
To place the labels, you could use
GridBagLayout, hope that’s what you want:alt text http://img694.imageshack.us/img694/4013/so23432332.png