Dimension (JComponent c) { if (!IdeaPopupMenuUI.isPartOfPopupMenu(c)) { return super.getPreferredSize(c); } return ((JSeparator)c).getOrientation() == SwingConstants.VERTICAL ? new Dimension(SEPARATOR_HEIGHT.get(), 0) : new Dimension(0, SEPARATOR_HEIGHT.get()); // height is prescaled, so use Dimension here. }