JPanel () { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); panel.setBorder(BorderFactory.createEmptyBorder(8,8,4,4)); gbConstraints.gridy = 0; gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridheight = 1; gbConstraints.weightx = 1; gbConstraints.weighty = 0; gbConstraints.insets = JBUI.insets(0, 8, 6, 4); gbConstraints.fill = GridBagConstraints.BOTH; JLabel paperSizeLabel = new MyLabel(EditorBundle.message("print.settings.paper.size.label")); panel.add(paperSizeLabel, gbConstraints); myPaperSizeCombo = createPageSizesCombo(); gbConstraints.gridx = 1; gbConstraints.gridwidth = 2; panel.add(myPaperSizeCombo, gbConstraints); JLabel fontLabel = new MyLabel(EditorBundle.message("print.settings.font.label")); gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridy++; panel.add(fontLabel, gbConstraints); myFontNameCombo = new FontComboBox(true); gbConstraints.gridx = 1; panel.add(myFontNameCombo, gbConstraints); myFontSizeCombo = createFontSizesComboBox(); gbConstraints.gridx = 2; panel.add(myFontSizeCombo, gbConstraints); myCbLineNumbers = new JCheckBox(EditorBundle.message("print.settings.show.line.numbers.checkbox")); gbConstraints.gridx = 0; gbConstraints.gridwidth = 3; gbConstraints.gridy++; panel.add(myCbLineNumbers, gbConstraints); myCbDrawBorder = new JCheckBox(EditorBundle.message("print.settings.draw.border.checkbox")); gbConstraints.gridy++; panel.add(myCbDrawBorder, gbConstraints); myCbEvenNumberOfPages = new JCheckBox(EditorBundle.message("print.settings.even.number.of.pages")); gbConstraints.gridy++; panel.add(myCbEvenNumberOfPages, gbConstraints); gbConstraints.insets = JBUI.insets(0, 0, 6, 4); gbConstraints.gridx = 0; gbConstraints.gridwidth = 3; gbConstraints.gridy++; panel.add(createStyleAndLayoutPanel(), gbConstraints); gbConstraints.gridy++; gbConstraints.weighty = 1; panel.add(new MyTailPanel(), gbConstraints); return panel; }