Java examples for 2D Graphics:Color
Converts the given FX color to awt color.
//package com.java2s; import javafx.scene.paint.Color; public class Main { /**/* w ww . jav a 2s .co m*/ * Converts the given FX color to awt color. * * @param color - FX * @return color - Awt */ public static java.awt.Color getAwtColor(Color color) { return new java.awt.Color((int) color.getRed(), (int) color.getGreen(), (int) color.getBlue(), (int) color.getOpacity()); } }