public Paint getGradientePaint(){
        int x1=0, x2=getWidth(), y1=0, y2=getHeight();
        switch (gradiente){
            case HORIZONTAL:
                x1=getWidth()/2;
                y1=0;
                x2=getWidth()/2;
                y2=getHeight();
                return new GradientPaint(x1,y1,colorPrimario, x2, y2,colorSecundario);
            case VERTICAL:
                x1=0;
                y1=getHeight()/2;
                x2=getWidth();
                y2=getHeight()/2;
                return new GradientPaint(x1,y1,colorPrimario, x2, y2,colorSecundario);
            case ESQUINA_1:
                x1=0;
                y1=0;
                return new RadialGradientPaint(x1, y1,
                        getWidth(),
                        new float[]{0f, 1f},
                        new Color[]{colorPrimario, colorSecundario});
            case ESQUINA_2:
                x1=getWidth();
                y1=0;
                return new RadialGradientPaint(x1, y1,
                        getWidth(),
                        new float[]{0f, 1f},
                        new Color[]{colorPrimario, colorSecundario});
            case ESQUINA_3:
                x1=getWidth();
                y1=getHeight();
                return new RadialGradientPaint(x1, y1,
                        getWidth(),
                        new float[]{0f, 1f},
                        new Color[]{colorPrimario, colorSecundario});
            case ESQUINA_4:
                x1=0;
                y1=getHeight();
                return new RadialGradientPaint(x1, y1,
                        getWidth(),
                        new float[]{0f, 1f},
                        new Color[]{colorPrimario, colorSecundario});
            case CIRCULAR:
                x1=getWidth()/2;
                y1=getHeight()/2;
                return new RadialGradientPaint(x1, y1,
                        getWidth(),
                        new float[]{0f, 0.5f},
                        new Color[]{colorPrimario, colorSecundario});
            case CENTRAL:
                x1=getWidth()/2;
                y1=0;
                x2=getWidth()/2;
                y2=getHeight();
                return new LinearGradientPaint(x1, y1, x2, y2, new float[]{0f, 0.5f, 1f},
                        new Color[]{colorPrimario, colorSecundario, colorPrimario});
            case AQUA:
                return new LinearGradientPaint(0, 0, 0, getHeight(),
                new float[]{0f, 0.3f, 0.5f, 1f},
                new Color[]{colorPrimario.brighter().brighter(),
                            colorPrimario.brighter(),
                            colorSecundario.darker().darker(),
                            colorSecundario.darker()});
            default:
                return new GradientPaint(0,0,colorPrimario, x2, y2,colorSecundario);
            }

        }