Rectangle () { int w = comboBox.getWidth(); int h = comboBox.getHeight(); Insets i = comboBox.getInsets(); int buttonWidth = h; if (arrowButton != null) { buttonWidth = comboBox.getComponentOrientation().isLeftToRight() ? arrowButton.getWidth() - i.right : arrowButton.getWidth() - i.left; } Rectangle rect = (comboBox.getComponentOrientation().isLeftToRight()) ? new Rectangle(i.left, i.top, w - (i.left + i.right + buttonWidth), h - (i.top + i.bottom)) : new Rectangle(i.left + buttonWidth, i.top, w - (i.left + i.right + buttonWidth), h - (i.top + i.bottom)); JBInsets.removeFrom(rect, padding); rect.width += comboBox.isEditable() ? 0 : padding.right; return rect; }