void (final Graphics g) { super.paint(g); final JBColor lightGray = new JBColor(JBColor.LIGHT_GRAY, Gray._95); final JBColor gray = new JBColor(JBColor.GRAY, Gray._95); if (ANCHOR_TOP == myAnchor) { g.setColor(lightGray); LinePainter2D.paint((Graphics2D)g, 0, 0, getWidth() - 1, 0); LinePainter2D.paint((Graphics2D)g, 0, 0, 0, getHeight() - 1); g.setColor(JBColor.GRAY); LinePainter2D.paint((Graphics2D)g, getWidth() - 1, 0, getWidth() - 1, getHeight() - 1); } else if (ANCHOR_LEFT == myAnchor) { g.setColor(lightGray); LinePainter2D.paint((Graphics2D)g, 0, 0, 0, getHeight() - 1); } else { if (ANCHOR_BOTTOM == myAnchor) { g.setColor(lightGray); LinePainter2D.paint((Graphics2D)g, 0, 0, 0, getHeight() - 1); g.setColor(gray); LinePainter2D.paint((Graphics2D)g, 0, getHeight() - 1, getWidth() - 1, getHeight() - 1); } else { // RIGHT g.setColor(gray); } LinePainter2D.paint((Graphics2D)g, getWidth() - 1, 0, getWidth() - 1, getHeight() - 1); } }