JPanel (@NlsContexts.Label String methodDefinedText, @NlsContexts.Label String methodNotDefinedLegallyText, @NlsContexts.Label String methodShouldBeDefined) { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gc = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insets(3, 5, 0, 5), 0, 0); JLabel label = new JLabel(methodDefinedText, AllIcons.Hierarchy.MethodDefined, SwingConstants.LEFT); label.setUI(new MultiLineLabelUI()); label.setIconTextGap(10); panel.add(label, gc); gc.gridy++; label = new JLabel(methodNotDefinedLegallyText, AllIcons.Hierarchy.MethodNotDefined, SwingConstants.LEFT); label.setUI(new MultiLineLabelUI()); label.setIconTextGap(10); panel.add(label, gc); gc.gridy++; label = new JLabel(methodShouldBeDefined, AllIcons.Hierarchy.ShouldDefineMethod, SwingConstants.LEFT); label.setUI(new MultiLineLabelUI()); label.setIconTextGap(10); panel.add(label, gc); return panel; }