View Single Post
  (#1 (permalink)) Old
ecarmody Offline
Thumbs Must Hurt
 
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
Default COLOR reference by string - 11-03-2005, 12:31 PM

Ok, so my java skill is lacking in a technique to do this.

I want to be able to use a string to represent a color, and to use that string to find the color integer value in the COLOR class.

IE. Where I would do...
graphics.setBackgroundColor(Color.SKYBLUE);

I want to find the INT color value from COLOR using a string value "SKYBLUE"

Since the colors are constants that represent integers, is there a way to find which constant equals a string value and then take its integer value?

Thanks,
Eric
   
Sponsored Links
Please Login or Register to Remove these Advertisements!