The cercle references are remade every call to paint - they are not being reused. Thus every call to addX/Y is lost when the reference is assigned a new value
That is exactly what you are doing...
Type: Posts; User: copeg
The cercle references are remade every call to paint - they are not being reused. Thus every call to addX/Y is lost when the reference is assigned a new value
That is exactly what you are doing...
Please define "Doesn't work". For what its worth, you should consider drawing within a JPanel, and override the paintComponent method (as opposed to drawing directly in a JFrame using paint)