Examples of GradientPaint


Examples of java.awt.GradientPaint

    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        final Graphics2D g2d = (Graphics2D) g;

        if (!CompatibilityUtil.isUnderGTKLookAndFeel()) {
            g2d.setPaint(new GradientPaint(0, 0, GRADIENT_C1, 0, getHeight(), GRADIENT_C2));
            g2d.fillRect(1, 1, getWidth(), getHeight() - 1);
            g2d.setPaint(null);
        }

        g.setColor(BORDER_COLOR);
View Full Code Here

Examples of java.awt.GradientPaint

        curveShape.lineTo(0, h);
        curveShape.lineTo(0, h * .8f);
        curveShape.closePath();

        // draw into the buffer a gradient (bottom to top), and the text "Login"
        GradientPaint gp = new GradientPaint(0, h, UIManager
                .getColor("JXLoginPane.banner.darkBackground"), 0, 0, UIManager
                .getColor("JXLoginPane.banner.lightBackground"));
        g2.setPaint(gp);
        g2.fill(curveShape);
        Image image = (Image) UIManager.get("JXLoginPane.banner.image");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.