Skip to content

Commit

Permalink
Nicer button for 'Copy error to clipboard'
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie authored and jenscski committed May 12, 2014
1 parent 199f216 commit 35e1601
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/processing/app/EditorStatus.java
Expand Up @@ -26,6 +26,7 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import java.awt.datatransfer.*;
import static processing.app.I18n._;

Expand Down Expand Up @@ -447,11 +448,14 @@ public void keyTyped(KeyEvent event) {
add(progressBar);
progressBar.setVisible(false);

copyErrorButton = new JButton(_("Copy To Clipboard"));
copyErrorButton = new JButton(
"<html>" + _("Copy error") + "<br>" + _("to clipboard") + "</html>");
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="";
Expand Down

0 comments on commit 35e1601

Please sign in to comment.