Example usage for java.awt Color YELLOW

List of usage examples for java.awt Color YELLOW

Introduction

In this page you can find the example usage for java.awt Color YELLOW.

Prototype

Color YELLOW

To view the source code for java.awt Color YELLOW.

Click Source Link

Document

The color yellow.

Usage

From source file:Main.java

public void paint(Graphics g) {
    super.paint(g);
    Graphics2D g2d = (Graphics2D) g;

    GradientPaint gp1 = new GradientPaint(5, 5, Color.red, 20, 20, Color.yellow, true);

    System.out.println(gp1.getPoint1());
    g2d.setPaint(gp1);// w w w .  j  a  v a  2s .com
    g2d.fillRect(20, 20, 300, 40);

}

From source file:Main.java

public void paint(Graphics g) {
    super.paint(g);
    Graphics2D g2d = (Graphics2D) g;

    GradientPaint gp1 = new GradientPaint(5, 5, Color.red, 20, 20, Color.yellow, true);

    System.out.println(gp1.isCyclic());
    g2d.setPaint(gp1);//from ww w .jav  a 2s . c o m
    g2d.fillRect(20, 20, 300, 40);

}

From source file:MainClass.java

public static void pictureBackdrop(float x, float y, PdfContentByte cb, PdfWriter writer) {
    PdfShading axial = PdfShading.simpleAxial(writer, x, y, x + 200, y, Color.yellow, Color.red);
    PdfShadingPattern axialPattern = new PdfShadingPattern(axial);
    cb.setShadingFill(axialPattern);//  w ww  .  j a  v  a 2 s.  c o m
    cb.setColorStroke(Color.black);
    cb.setLineWidth(2);
    cb.rectangle(x, y, 200, 200);
    cb.fillStroke();
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.fillArc(5, 15, 50, 75, 25, 165);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.draw3DRect(5, 15, 50, 75, false);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.fillOval(5, 15, 50, 75);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.drawOval(5, 15, 50, 75);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.drawArc(5, 15, 50, 75, 25, 165);
}

From source file:MainClass.java

public void paint(Graphics g) {
    g.setColor(Color.yellow);
    g.fill3DRect(5, 15, 50, 75, true);
}

From source file:Main.java

public void paint(Graphics g) {
    super.paint(g);
    Graphics2D g2d = (Graphics2D) g;

    GradientPaint gp1 = new GradientPaint(5, 5, Color.red, 20, 20, Color.yellow, true);

    gp1.createContext(ColorModel.getRGBdefault(), new Rectangle(0, 0, 30, 40), new Rectangle(0, 0, 30, 40),
            new AffineTransform(), null);

    System.out.println(gp1.getTransparency());
    g2d.setPaint(gp1);/*from   ww w.j  a v  a 2s.c o m*/
    g2d.fillRect(20, 20, 300, 40);

}