void (Graphics g) { final Graphics2D g2d = (Graphics2D)g; if (myVertical) { g2d.setPaint(UIUtil.getGradientPaint(0f, 0f, Color.WHITE, 0f, getHeight(), Color.BLACK)); g.fillRect(7, 10, 12, getHeight() - 20); g.setColor(Gray._150); g.drawRect(7, 10, 12, getHeight() - 20); g.setColor(Gray._250); g.drawRect(8, 11, 10, getHeight() - 22); } else { g2d.setPaint(UIUtil.getGradientPaint(0f, 0f, Color.WHITE, getWidth(), 0f, Color.BLACK)); g.fillRect(10, 7, getWidth() - 20, 12); g.setColor(Gray._150); g.drawRect(10, 7, getWidth() - 20, 12); g.setColor(Gray._250); g.drawRect(11, 8, getWidth() - 22, 10); } drawKnob(g2d, myVertical ? 7 : myPointerValue, myVertical ? myPointerValue : 7, myVertical); }