JPanel (Insets insets, JLabel messageLabel, JTextArea messageArea) { JPanel messagePanel = new BorderLayoutPanel(5, 5); messagePanel.add(messageLabel, BorderLayout.WEST); JBScrollPane scrollPane = new JBScrollPane(messageArea); scrollPane.setBorder(new CompoundBorder(new LineBorder(UIUtil.getPanelBackground(), insets.top), scrollPane.getBorder())); messagePanel.add(scrollPane, BorderLayout.CENTER); return messagePanel; }