java - Convert a string to a swt color -


the real problem want use color chooser (for awt color), swt component. thought awt color, .tostring on it, recover string, , convert swt color. harder expected.

here string convert :

string mycolor = "color {248, 248, 248}"; 

i did .tostring method on awt color.

do have idea on how ?

here sample method taken example, converts awt color swt color :

public static color toswtcolor(device device, java.awt.color color) {         return new org.eclipse.swt.graphics.color(device,                 color.getred(), color.getgreen(), color.getblue());     } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -