Hi all,
I am trying to draw multiple circles (actually arcs to make one circle)
on top of one another in a panel. What I want is to draw one circle
(c1) in a panel, then after some time erase the panel and redraw c1 a
little smaller and draw a second circle(c2) on top at the original size
of c1. This will continue as more circles are drawn on top of the
previous circle which decrease in size each time creating a sort of
tunnel(each circle a low alpha so you can see what is behind it.
I have to problems.
First I can't seem to get the circles to draw on top of each other.
Each time I draw another circle it erases the first circle so that the
newest circle is the only one that shows.
Second, I created an array of my circle object that holds the circles
as they are created. What I need to do is to push back the first circle
to the second position in the array when a second one is created and on
and on like that.
Here is my circle drawing class:
public class CircleDraw extends JPanel{
//create loop of colors to associate with the notes of
the scale
Color[] pieColors = {new Color(255,255,255,20),
//Silent WHITE
new
Color(255,0,0,20), //A RED
new
Color(191,64,0,20), //A#
new
Color(128,128,0,20), //B
new
Color(64,191,0,20), //C
new
Color(0,255,0,20), //C# GREEN
new
Color(0,191,64,20), //D
new
Color(0,128,128,20), //D#
new
Color(0,64,191,20), //E
new
Color(0,0,255,20), //F BLUE
new
Color(64,0,191,20), //F#
new
Color(128,0,128,20), //G
new
Color(191,0,64,20)}; //G#
int xPos;
int yPos;
int mySize;
int panelWidth = 400;
int panelHeight = 400;
int arcRotation = 0;
int numbOfSlices = numbOfNotes;
int arcAngle = 360/numbOfSlices;
public CircleDraw(int size){
super();
setPreferredSize(new
Dimension(panelWidth,panelHeight));
this.mySize = size;
I would really appreciate any help. I can't get it.
Jay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden