From 55ade2daeb05d2964194d6c8db774d5b2184c1d2 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 3 May 2013 15:46:20 +0200 Subject: [PATCH] Nicer button for 'Copy error to clipboard' --- app/src/processing/app/EditorStatus.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/EditorStatus.java b/app/src/processing/app/EditorStatus.java index fbcd3fdb1..fa45f02e5 100644 --- a/app/src/processing/app/EditorStatus.java +++ b/app/src/processing/app/EditorStatus.java @@ -26,6 +26,7 @@ package processing.app; import java.awt.*; import java.awt.event.*; import javax.swing.*; + import java.awt.datatransfer.*; import static processing.app.I18n._; @@ -447,11 +448,14 @@ public class EditorStatus extends JPanel /*implements ActionListener*/ { add(progressBar); progressBar.setVisible(false); - copyErrorButton = new JButton(_("Copy To Clipboard")); + copyErrorButton = new JButton( + "" + _("Copy error") + "
" + _("to clipboard") + ""); + Font font = copyErrorButton.getFont(); + font = new Font(font.getName(), font.getStyle(), (int) (font.getSize()*0.7)); + copyErrorButton.setFont(font); + copyErrorButton.setHorizontalAlignment(JLabel.CENTER); add(copyErrorButton); - //copyErrorButton.setVisible(true); copyErrorButton.setVisible(false); - System.out.println("create copyErrorButton"); copyErrorButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String message="";