Shape (Component c, Rectangle rect) { Path2D border = new Path2D.Float(Path2D.WIND_EVEN_ODD); if (isComboPopup(c) && ((BasicComboPopup)c).getClientProperty("JComboBox.isCellEditor") == Boolean.TRUE) { JBInsets.removeFrom(rect, JBInsets.create(0, 1)); } border.append(rect, false); Rectangle innerRect = new Rectangle(rect); JBInsets.removeFrom(innerRect, JBUI.insets(JBUI.getInt("PopupMenu.borderWidth", 1))); border.append(innerRect, false); return border; }