开发者

graphics.setcolor - what parameter?

开发者 https://www.devze.com 2023-03-04 18:39 出处:网络
im using the Graphics.setColor() to set the color of an arc im drawing. what im tr开发者_如何学Going to figure out is what color format do i stick into the brackets. its not RGB because i cant use let

im using the Graphics.setColor() to set the color of an arc im drawing. what im tr开发者_如何学Going to figure out is what color format do i stick into the brackets. its not RGB because i cant use letters


You need to pass in a Color object.

The documentation is quite clear - didn't you check it?


You can do the following:

g.setColor(new Color(255, 255, 0);

Where g is an object of type Graphics.

0

精彩评论

暂无评论...
验证码 换一张
取 消