void (Graphics g, int x, int y, int width, int height, Color border, Color bg, boolean top, boolean left, boolean bottom, boolean right) { if ((width <= 0) || (height <= 0)) return; g.setColor(border); if (top) { g.drawLine(x + width - 1, y, x, y); y++; height--; if (height <= 0) return; } if (left) { g.drawLine(x, y, x, y + height - 1); x++; width--; if (width <= 0) return; } if (bottom) { g.drawLine(x, y + height - 1, x + width - 1, y + height - 1); height--; if (height <= 0) return; } if (right) { g.drawLine(x + width - 1, y + height - 1, x + width - 1, y); width--; if (width <= 0) return; } //java> if (bg == c_ctrl) { if (height > block) { g.setColor(c_bg); g.fillRect(x, y, width, height - block); } for (int i = 0; i < width; i += block) { g.drawImage(gradient, x + i, (height > block) ? (y + height - block) : y, x + Math.min(i + block, width), y + height, 0, 0, Math.min(block, width - i), Math.min(block, height), null); } /*if (width > block) { g.setColor(c_bg); g.fillRect(x, y, width - block, height); } for (int i = 0; i < height; i += block) { g.drawImage(gradient, (width > block) ? (x + width - block) : x, y + i, x + width, y + Math.min(i + block, height), 0, 0, Math.min(block, width), Math.min(block, height - i), null); }*/ } else { g.setColor(bg); g.fillRect(x, y, width, height); } //<java //midp g.setColor(bg); //midp g.fillRect(x, y, width, height); }