Is there any way we can get color from String (like "White")?
Color color;
Field field = Class.forName("java.awt.Color").getField("Yellow");
color = (Color)field.get(null);
I tried Converting a String to Color in Java and it throws error . What "Field" belongs to? What package do I need to import for it?