Beispiel #1
0
  public void paint(Graphics g) {

    g.setColor(Color.white); // Background flushing
    g.fillRect(0, 0, 800, 800);

    g.setColor(Color.red);
    for (Target a : targets) // Target painting
    {
      if (a.getImageType() == "clay_pigeon.gif")
        g.drawImage(target1, a.getX(), a.getY(), a.getSize(), a.getSize(), this);
      if (a.getImageType() == "Disc1.gif")
        g.drawImage(target2, a.getX(), a.getY(), a.getSize(), a.getSize(), this);
    }

    //    	g.setColor(Color.red);
    //    	for(int i = 0; i < regions.size(); i++) // Region painting
    //    	{
    //    		g.fillRect(regions.get(i).getX(), regions.get(i).getY(), regions.get(i).getW(),
    // regions.get(i).getH());
    //    	}

  }