Package java.awt

Examples of java.awt.Graphics2D.fillOval()


            GradientPaint gp = new GradientPaint(180.0f, 280.0f, new Color(255, 255, 255, 255), 250.0f, 380.0f, new Color(255, 255, 0, 0));
            g2.setPaint(gp);
            for(int i = 0; i < 3; i ++ ) {
                g2.drawOval(150, 280, 100, 100);
                g2.fillOval(150, 280, 100, 100);
                g2.translate(120, 20);
            }
        }
    }
View Full Code Here


    g.translate(drawArea.getX() - adjustX, drawArea.getY() - adjustY);
    final int radius = (int) (drawArea.getWidth() < drawArea.getHeight() ? drawArea.getWidth() : drawArea.getHeight());
    // draw a filled circle form its center to its edge with the background color
    g.setPaint(color);
    g.fillOval(0, 0, radius, radius);

    // draw the value arc
    final int endArc = (int) (value.doubleValue() * 360);
    //find the color
    g.setBackground(Color.BLUE)//init some debug color
View Full Code Here

      {
        g2d.setColor(Color.CYAN);
        g2d.fillRect(0, 0, 544, 400);

        g2d.setColor(Color.YELLOW);
        g2d.fillOval(30, 30, 75, 75);
      } else
      {
        g2d.setColor(Color.DARK_GRAY);
        g2d.fillRect(0, 0, 544, 400);
View Full Code Here

      {
        g2d.setColor(Color.DARK_GRAY);
        g2d.fillRect(0, 0, 544, 400);

        g2d.setColor(Color.WHITE);
        g2d.fillOval(30, 30, 75, 75);

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
View Full Code Here

        g2d.setColor(Color.WHITE);
        g2d.fillOval(30, 30, 75, 75);

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
View Full Code Here

        g2d.setColor(Color.WHITE);
        g2d.fillOval(30, 30, 75, 75);

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
        g2d.fillOval(48, 42, 5, 5);
View Full Code Here

        g2d.fillOval(30, 30, 75, 75);

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
        g2d.fillOval(48, 42, 5, 5);
        g2d.fillOval(50, 54, 5, 5);
View Full Code Here

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
        g2d.fillOval(48, 42, 5, 5);
        g2d.fillOval(50, 54, 5, 5);
        g2d.fillOval(57, 54, 5, 5);
View Full Code Here

        g2d.setColor(Color.DARK_GRAY);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
        g2d.fillOval(48, 42, 5, 5);
        g2d.fillOval(50, 54, 5, 5);
        g2d.fillOval(57, 54, 5, 5);
        g2d.fillOval(35, 35, 5, 5);
View Full Code Here

        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
        g2d.fillOval(40, 40, 5, 5);
        g2d.fillOval(42, 39, 5, 5);
        g2d.fillOval(45, 44, 5, 5);
        g2d.fillOval(42, 49, 5, 5);
        g2d.fillOval(48, 42, 5, 5);
        g2d.fillOval(50, 54, 5, 5);
        g2d.fillOval(57, 54, 5, 5);
        g2d.fillOval(35, 35, 5, 5);
        g2d.fillOval(38, 35, 5, 5);
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.