Converting a String to Color in Java
Posted
by devoured elysium
on Stack Overflow
See other posts from Stack Overflow
or by devoured elysium
Published on 2010-05-18T01:23:31Z
Indexed on
2010/05/18
1:30 UTC
Read the original article
Hit count: 278
In .NET you can achieve something like this:
Color yellowColor = Color.FromName("yellow");
Is there a way of doing this in Java without having to resort to reflection?
PS: I am not asking for alternative ways of storing/loading colors. I just want to know wherever it is possible to do this or not.
© Stack Overflow or respective owner