This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Creating Color object using color name as String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Creating Color object using color name as String" Watch "Creating Color object using color name as String" New topic
Author

Creating Color object using color name as String

lakshmana dhanimireddi
Greenhorn

Joined: Jul 05, 2011
Posts: 18

Hi, Can we create a Color object using color name as String?

Thanks.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Not with the standard Java SE API, no. But you can easily write a method that accepts a String parameter and returns a Color.


luck, db
There are no new questions, but there may be new answers.
 
jQuery in Action, 2nd edition
 
subject: Creating Color object using color name as String
 
Similar Threads
Is there any means to check the number of objects created when a java prgram runs.
Color
How we can find that how much string objects has been created?
Object class
Concept of new!