This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Color object using color name as String
 
Similar Threads
Object class
Concept of new!
Color
Is there any means to check the number of objects created when a java prgram runs.
How we can find that how much string objects has been created?