final JPanel panelMain = new JPanel(new BorderLayout()); // Main Panel
final JPanel panelHeader = new JPanel(new BorderLayout()); // header (toolbar and textfields)
final JPanel panelTextfields = new JPanel(new GridBagLayout());
final JToolBar panelToolbar = new JToolBar(); // toolbar
panelToolbar.setRollover(true);
panelToolbar.setFloatable(false);
final JScrollPane bodyScrollPane = new JScrollPane(messageTextArea); // Textscrollpane
bodyScrollPane.setWheelScrollingEnabled(true);
bodyScrollPane.setMinimumSize(new Dimension(100, 50));
// FIXME: add a smiley chooser right beside the subject textfield!
// text fields
final GridBagConstraints constraints = new GridBagConstraints();
final Insets insets = new Insets(0, 3, 0, 3);
final Insets insets0 = new Insets(0, 0, 0, 0);
constraints.fill = GridBagConstraints.NONE;
constraints.anchor = GridBagConstraints.WEST;
constraints.weighty = 0.0;
constraints.weightx = 0.0;
constraints.insets = insets;
constraints.gridx = 0;
constraints.gridy = 0;
constraints.fill = GridBagConstraints.NONE;
constraints.gridwidth = 1;
constraints.insets = insets;
constraints.weightx = 0.0;
panelTextfields.add(Lboard, constraints);
constraints.gridx = 1;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.gridwidth = 2;
constraints.insets = insets0;
constraints.weightx = 1.0;
panelTextfields.add(TFboard, constraints);
constraints.gridx = 0;
constraints.gridy++;
constraints.fill = GridBagConstraints.NONE;
constraints.gridwidth = 1;
constraints.insets = insets;
constraints.weightx = 0.0;
panelTextfields.add(Lfrom, constraints);
constraints.gridx = 1;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.gridwidth = 2;
constraints.insets = insets0;
constraints.weightx = 1.0;
panelTextfields.add(getOwnIdentitiesComboBox(), constraints);
constraints.gridx = 0;
constraints.gridy++;
constraints.fill = GridBagConstraints.NONE;
constraints.gridwidth = 1;
constraints.insets = insets;
constraints.weightx = 0.0;
panelTextfields.add(Lsubject, constraints);
constraints.gridx = 1;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.gridwidth = 1;
constraints.insets = insets0;
constraints.weightx = 1.0;
panelTextfields.add(subjectTextField, constraints);
constraints.gridx = 2;
constraints.fill = GridBagConstraints.NONE;
constraints.gridwidth = 1;
constraints.insets = insets;
constraints.weightx = 0.0;
panelTextfields.add(BchooseSmiley, constraints);
// toolbar
panelToolbar.add(Bsend);
panelToolbar.add(Bcancel);
panelToolbar.addSeparator();
panelToolbar.add(BattachFile);
panelToolbar.add(BattachBoard);
panelToolbar.addSeparator();
panelToolbar.add(sign);
panelToolbar.addSeparator();
panelToolbar.add(encrypt);
panelToolbar.add(buddies);
// panelButtons.add(addAttachedFilesToUploadTable);
final ScrollableBar panelButtonsScrollable = new ScrollableBar(panelToolbar);
panelHeader.add(panelButtonsScrollable, BorderLayout.PAGE_START);