Q:

NetBeans Panel design

I am doing a project using JPanels and JFrames where I am to create panel that says "Welcome to Target" along with the Target logo positioned underneath the message. The classes I have are Main, TargetLogoPanel, and TargetLogoUI.
I tried messing with the design functions that were implemented into Netbeans 7.1, but could't find a way to draw ovals that way, so this is the code I added in: 
@Override
protected void paintComponent(Graphics g) {
    g.setColor(Color.red);
    g.fillOval(((targetPanel.getWidth()) / 2) - 100,
            ((targetPanel.getHeight()) / 2) - 100, 200, 200);
    g.setColor(Color.WHITE);
    g.fillOval(((targetPanel.getWidth()) / 2) - 65,
            ((targetPanel.getHeight()) / 2) - 65, 130, 130);
    g.setColor(Color.red);
    g.fillOval(((targetPanel.getWidth()) / 2) - 30,
            ((targetPanel.getHeight()) / 2) - 30, 60, 60);

}

The logo is to be 200 pixels wide and stay center when the frame is resized.  However, just with what I  have added, the circle is not drawn when the program is ran.  In my main method I put new TargetLogoUI().setVisible(true);
What exactly am I doing wrong here?

A:

I searched on google for a bullseye and came across this example. I provided the modified JPanel below.
I set the rings = 3 and flipped red/white in paintComponent()
class Bullseye extends JPanel {
  static final int SIZE = 300; // initial window size
  int rings = 3; // Number of rings to draw in bullseye

  public Bullseye() {
    this.setBackground(Color.white);
    this.setPreferredSize(new Dimension(SIZE, SIZE));
  }

  public void setRings(int r) {
    rings = r;
    this.repaint(); // new value of rings - better repaint
  }

  public void paintComponent(Graphics g) {
    super.paintComponent(g);
    // x,y coordinate of top left corner for drawing circles
    int x = SIZE / 2;
    int y = SIZE / 2;

    for (int i = rings; i > 0; i--) {
      if (i % 2 == 0)
        g.setColor(Color.white);
      else
        g.setColor(Color.red);
      int radius = i * 100 / rings; // compute radius of this ring
      g.fillOval(x - radius, y - radius, radius * 2, radius * 2);
    }
  }
}

