Color.getGreen() has the following syntax.
public int getGreen()
In the following code shows how to use Color.getGreen() method.
import java.awt.Color; //w w w . j av a2s .co m public class Main { public static void main(String[] args) { Color myColor = Color.RED; System.out.println(myColor.getGreen()); } }
The code above generates the following result.