|
文本编辑器源文件(java语言)(2) for (int i = 0; i < strlen; i++) { float h = ((float)i)/((float)strlen); colors2[i] = new Color(Color.HSBtoRGB(1.0f,1.0f,h)); } setLayout(null); OK= new Button("确定"); Cancel= new Button("取消"); OK.reshape(320,100,80,30); add(OK); Cancel.reshape(320,150,80,30); add(Cancel); test= new Rectangle(0,0,300,250); reshape(x/2-210,y/2-140,420,280); show(); }
public void update(GraphiCS g) { int y= 0; for (int i = 0; i < strlen; i++) { g.setColor(colors[i]); g.fillRect(0,y,100,1); y+=1; } y= 0; for (int i = 0; i < strlen; i++) { g.setColor(colors1[i]);
|