public void draw(Graphics2D g2, int x, int y)
    {
        RoundRectangle2D.Double r = new RoundRectangle2D.Double(x, y, getWidth(), getHeight(), 5, 5);
        g2.setColor(new Color(245, 245, 245));
        g2.fill(r);
        if(selected)
        {
            if(name.equals("relative"))
            {
                g2.setColor(Color.GRAY);
            }
            else
            {
                g2.setColor(Color.GRAY);
                g2.setStroke(new BasicStroke(2));
            }
        }
        else
        {
            if(name.equals("relative"))
            {
                g2.setColor(Color.GRAY);
                g2.setStroke(new BasicStroke(2));
            }
            else
            {
                g2.setColor(Color.GRAY);
            }
        }
        g2.draw(r);
        g2.setStroke(new BasicStroke(1));
        g2.drawImage(icon, x+buffer, y+buffer, null);
    }