private fun drawBackground() { val rect: java.awt.Rectangle = getClientArea() cachedGC.setForeground(gradientStart) cachedGC.setBackground(gradientEnd) cachedGC.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height / 2, true) cachedGC.setForeground(gradientEnd) cachedGC.setBackground(gradientStart) cachedGC.fillGradientRectangle(rect.x, rect.height / 2, rect.width, rect.height / 2, true) }
Draw the background