I am trying to make something similar to LED diode in Java ( I extend JPanel and override paint method ). I draw cicrle in center of panel with radius =20px ( green on, red off). Is there any way to paint that circle gradient ( darker in rcenter and lighte at edge ) ?
是:使用RadialGradientPaint绘制圆。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.