Custom JLabel that draw a circle
<p>I want a JLabel that draws a circle around it. I have some code already but the circle does not draw, am I doing something wrong here?</p>

<pre><code>public class TowerMarker extends JLabel
{
    private int x, y, id;
    private ImageIcon ic;
    private String ql;

    public TowerMarker(int id, int x, int y, ImageIcon ic, String ql)
    {
        this.x = x;
        this.y = y;
        this.ic = ic;
        this.ql = ql;
        setBounds(x, y, 40, 85);
        setIcon(ic);
        setToolTipText("QL: "+ql);
        updateUI();

    }

    @Override
    public int getX()
    {
            return x;
    }

    @Override
    public int getY()
    {
        return y;
    }

    public String getQL()
    {
        return ql;
    }

    public ImageIcon getImageIcon()
    {
        return ic;
    }

    public int getID()
    {
        return id;
    }

    @Override
    public String toString()
    {
        return x+":"+y+":"+ql;
    }

    @Override
    public void paintComponent(Graphics g)
    {
        g.setColor(Color.red);

        g.drawOval(x, y, 20, 20);

        ui.update(g, this);
    }
}
</code></pre>
