JComponent (@NotNull Presentation presentation, @NotNull String place) { JLabel label = new JLabel(); //noinspection HardCodedStringLiteral label.setText("9888 results"); Dimension size = label.getPreferredSize(); size.height = Math.max(size.height, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE.height); label.setPreferredSize(size); label.setText(null); label.setHorizontalAlignment(SwingConstants.CENTER); return label; }