title: Trying to populate the screen with objects
body: <p>it seems I have a problem understanding classes. It would be great if someone could help.</p>
  
  <p>I'm trying to populate my Smartphone screen (android) with 3 circles of different color.
  My problem is that by using the code below I only get one (blue) circle.</p>
  
  <p>I considered that the Problem is that the y-value isn't set correctly and the 3 circles are hiding each other (so that only the blue one is visible). But when I log the y-value of the 3 circle objects, the y-values seem to be correct (200,500,800)</p>
  
  <p>Whats am I doing wrong?</p>
  
  <p>Thanks for your help in advance.</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MainActivity extends Activity {
  
      public Circle circleR;
      public Circle circleG;
      public Circle circleB;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          circleR = new Circle(this, 200, 255, 0, 0);
          setContentView(circleR);
  
          circleG = new Circle(this, 500, 0, 255, 0);
          setContentView(circleG);
  
          circleB = new Circle(this, 800, 0, 0, 255);
          setContentView(circleB);
  
      }
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>public class Circle extends View {
  
      public Paint paint;
      public int y;
  
      public Circle(Context context,int y, int r, int g, int b){
          super(context);
  
          paint=new Paint();
          paint.setColor(Color.rgb(r,g,b));
  
          this.y=y;
      }
  
      @Override
      protected void onDraw(Canvas canvas){
          canvas.drawCircle(30, this.y,30, paint);
      }
  }
  </code></pre>