logPanel.add(panel, BorderLayout.SOUTH);
JButton toClipboardBtn = new JButton("To Clipboard");
toClipboardBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection data = new StringSelection(getLogTextArea().getText());
clipboard.setContents(data, data);
}
});
toClipboardBtn.setPreferredSize(new Dimension(128, 28));
toClipboardBtn.setForeground(SystemColor.menu);
toClipboardBtn.setBorderPainted(false);