Package: java.awt.* |
Product: JDK |
Release: 1.0.2 |
Related Links: |
Color
Cursor
FileDialog
Font
FontMetrics
Frame
general
Image
LayoutManager
Menu
ScrollPane
|
Comment: |
The easy way is to convert the string as an int with radix 16. The following code snapshots :
// // ColorUtil.java // package nl.rotterdam.port.awt; import java.awt.*; /** * This clas extends the color class and * add features like valueOf to the color class * to convert HTML color format to a Color object. */ public class ColorPlus { /** * Parses the specified Color as a string. * @param representation of the color as a 24-bit integer, the format of the string can be either htmlcolor |