void (int background, int text, int textbackground, int border, int disable, int hover, int press, int focus, int select) { c_bg = new Color(background); c_text = new Color(text); c_textbg = new Color(textbackground); c_border = new Color(border); c_disable = new Color(disable); c_hover = new Color(hover); c_press = new Color(press); c_focus = new Color(focus); c_select = new Color(select); //midp c_ctrl = c_hover; //java> int[] pix = new int[block * block]; int r1 = c_bg.getRed(); int r2 = c_press.getRed(); int g1 = c_bg.getGreen(); int g2 = c_press.getGreen(); int b1 = c_bg.getBlue(); int b2 = c_press.getBlue(); for (int i = 0; i < block; i++) { int r = r1 - (r1 - r2) * i / block; int g = g1 - (g1 - g2) * i / block; int b = b1 - (b1 - b2) * i / block; int color = (255 << 24) | (r << 16) | (g << 8) | b; for (int j = 0; j < block; j++) { pix[i * block + j] = color; //pix[j * block + i] = color; } } gradient = createImage(new MemoryImageSource(block, block, pix, 0, block)); //<java }