Here you can find the source of drawAndFill(Graphics g, Shape s, Color draw, Color fill)
public static void drawAndFill(Graphics g, Shape s, Color draw, Color fill)
//package com.java2s; //License from project: Apache License import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Shape; public class Main { public static void drawAndFill(Graphics g, Shape s, Color draw, Color fill) { Graphics2D g2 = (Graphics2D) g; g2.setColor(fill);/* ww w. ja va2 s . c o m*/ g2.fill(s); g2.setColor(draw); g2.draw(s); } }