Li Wu:
Learn to think more, honouring teachers save Thanksgiving. Leaf See root Three return one, living water Qingyuan hidden in zero.
Meekness The Lord of Conscience, Haoyuedangkong the King of Freedom. Willing to give the most ascetic no regrets, sincere advice and the line and cherish.
Os:windows7 x64
Jdk:jdk-8u131-windows-x64
Ide:eclipse Oxygen Release (4.7.0)
Code
Package Blog.jizuiku3;import Java.awt.color;import java.awt.frame;/** * A simple example of setting the background color of a form * * @author Jizuiku * @ Version V17.09.30 */public class Framebgcdemo {public static void main (string[] args) {frame f = new Frame ();//value int of primary color r = 4;int g = 5;int B = 70; Color BgColor = new Color (r, G, b);//Set Background color f.setbackground (bgColor); int width = 400;int height = 500;f.setsize (width, hei ght); f.setvisible (True);}}
Result
Java is good, worth learning.
Learning resources: Itcast and Itheima Video library. If you have public resources, can share to me, with your resources to learn also can.
Blog post is to watch the video, into thinking written. It's good that the teacher speaks well. Blog bad, is to give the most bitter not serious.
Javase base AWT Frame Set the background color of the form