Rectangle () { Rectangle rectangle = super.rectangleForCurrentValue(); rectangle.width -= myPanel.getWidth(); if (!comboBox.getComponentOrientation().isLeftToRight()) { rectangle.x += arrowButton.getWidth() + myPanel.getWidth(); } return rectangle; }