@Override
    public void paint(Graphics g) {
    
        Graphics2D g2d = (Graphics2D) g;
        
        GradientPaint grad;
        if (selected && hovered)
        {
            grad = new GradientPaint(0,0, new Color(80, 80, 255),0 , getHeight()/2, new Color(200, 200, 180),true);
        }
        else if (selected)
        {
            grad = new GradientPaint(0,0, new Color(100, 100, 255),0 , getHeight()/2, new Color(200, 200, 180),true);
        }
        else if (hovered)
        {
            grad = new GradientPaint(0,0, Color.GRAY,0 , getHeight()/2, new Color(200, 200, 180),true);
        }
        else
        {
            grad = new GradientPaint(0,0, Color.lightGray,0 , getHeight()/2, Color.lightGray.darker(),true);
        }
        
        g2d.setPaint(grad);
        g2d.fillRoundRect(1, 1, getWidth()-2, getHeight()-2, 15, 15);
        
        g2d.setColor(Color.BLACK);
        g2d.drawRoundRect(1, 1, getWidth()-2, getHeight()-2, 15, 15);
        
        super.paint(g);
    }