JPanel () { // JPanel panel = createGroupPanel("Header"); JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEmptyBorder(8,8,4,4)); panel.setLayout(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.gridy = 0; gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridheight = 1; gbConstraints.weightx = 1; gbConstraints.fill = GridBagConstraints.BOTH; gbConstraints.insets = JBUI.insets(0, 0, 6, 4); gbConstraints.gridwidth = 3; myLineTextField1 = new MyTextField(30); myLinePlacementCombo1 = new ComboBox<>(); myLineAlignmentCombo1 = new ComboBox<>(); JPanel linePanel1 = createLinePanel(EditorBundle.message("print.header.line.1.label"), myLineTextField1, myLinePlacementCombo1, myLineAlignmentCombo1); panel.add(linePanel1, gbConstraints); myLineTextField2 = new MyTextField(30); myLinePlacementCombo2 = new ComboBox<>(); myLineAlignmentCombo2 = new ComboBox<>(); JPanel linePanel2 = createLinePanel(EditorBundle.message("print.header.line.2.label"), myLineTextField2, myLinePlacementCombo2, myLineAlignmentCombo2); gbConstraints.gridy++; panel.add(linePanel2, gbConstraints); gbConstraints.insets = JBUI.insets(0, 8, 6, 4); gbConstraints.gridy++; gbConstraints.gridwidth = 1; gbConstraints.gridx = 0; panel.add(new MyLabel(EditorBundle.message("print.header.font.label")), gbConstraints); myFooterFontNameCombo = new FontComboBox(true); gbConstraints.gridx = 1; panel.add(myFooterFontNameCombo, gbConstraints); myFooterFontSizeCombo = createFontSizesComboBox(); gbConstraints.gridx = 2; panel.add(myFooterFontSizeCombo, gbConstraints); return panel; }