How to add RGB values into setColor() in Java?

You can get a Color instance with the simple code:

Color myWhite = new Color(255, 255, 255); // Color white

Then, you can set RGB color to your object with something like that:

g.setColor(myWhite);

Hope it helps you!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)