JButton () { Color bg = comboBox.getBackground(); Color fg = comboBox.getForeground(); JButton button = new BasicArrowButton(SwingConstants.SOUTH, bg, fg, fg, fg) { @Override public void paint(Graphics g) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); Rectangle r = getArrowButtonRect(this); g2.translate(r.x, r.y); if (myPaintArrowButton) { float bw = BW.getFloat(); float lw = LW.getFloat(); float arc = myArc; arc = arc > bw + lw ? arc - bw - lw : 0.0f; Path2D innerShape = new Path2D.Float(); innerShape.moveTo(lw, lw); innerShape.lineTo(r.width - lw - arc, lw); innerShape.quadTo(r.width - lw, lw, r.width - lw, lw + arc); innerShape.lineTo(r.width - lw, r.height - lw - arc); innerShape.quadTo(r.width - lw, r.height - lw, r.width - lw - arc, r.height - lw); innerShape.lineTo(lw, r.height - lw); innerShape.closePath(); g2.setColor(JBUI.CurrentTheme.Arrow.backgroundColor(comboBox.isEnabled(), comboBox.isEditable())); g2.fill(innerShape); // Paint vertical line if (comboBox.isEditable() || ClientProperty.isTrue(comboBox, PAINT_VERTICAL_LINE)) { g2.setColor(getOutlineColor(comboBox.isEnabled(), false)); g2.fill(new Rectangle2D.Float(0, lw, LW.getFloat(), r.height - lw * 2)); } } g2.translate(-r.x, -r.y + JBUI.scale(1)); paintArrow(g2, this); } finally { g2.dispose(); } } @Override public Dimension getPreferredSize() { return getArrowButtonPreferredSize(comboBox); } }; button.setBorder(JBUI.Borders.empty()); button.setOpaque(false); return button; }