JComponent () { myProjectLabel = new JBLabel(TaskBundle.message("label.project"), SwingConstants.RIGHT); myProjectComboBox = new ComboBox<>(300); myProjectComboBox.setRenderer(SimpleListCellRenderer.create(TaskBundle.message("label.set.server.url.token.first"), GitlabProject::getName)); myProjectLabel.setLabelFor(myProjectComboBox); return new FormBuilder().addLabeledComponent(myProjectLabel, myProjectComboBox).getPanel(); }