JComponent () { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gc = new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, JBUI.insets(10, 0, 0, 4), 0, 0); panel.add(new JLabel("Label one:"), gc); gc.gridx++; panel.add(new JCheckBox("<html>Multiline<br/>html<br/>checkbox</html>"), gc); gc.gridx++; panel.add(new JCheckBox("<html>Single line html checkbox</html>"), gc); gc.gridx++; panel.add(new JCheckBox("Single line checkbox"), gc); gc.gridx++; panel.add(new JButton("Button 1"), gc); gc.gridy++; gc.gridx = 0; panel.add(new JLabel("Label two:"), gc); ButtonGroup bg = new ButtonGroup(); JRadioButton rb = new JRadioButton("<html>Multiline<br/>html<br/>radiobutton</html>"); bg.add(rb); rb.setSelected(true); gc.gridx++; panel.add(rb, gc); rb = new JRadioButton("<html>Single line html radiobutton</html>"); bg.add(rb); gc.gridx++; panel.add(rb, gc); rb = new JRadioButton("Single line radiobutton"); bg.add(rb); gc.gridx++; panel.add(rb, gc); gc.gridx++; panel.add(new JButton("Button 2"), gc); gc.gridy++; gc.gridx = 0; gc.anchor = GridBagConstraints.PAGE_END; gc.fill = GridBagConstraints.BOTH; gc.weightx = 1.0; gc.weighty = 1.0; gc.gridwidth = 5; panel.add(new JPanel(), gc); return JBUI.Panels.simplePanel().addToTop(panel); }