Switch to lambda

This commit is contained in:
gaugendre 2015-06-04 23:40:48 +02:00
parent 249e6994db
commit 38f0ee78b2

View file

@ -44,14 +44,11 @@ public class MainPanel {
}
}
});
copyToClipboardButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String myString = outputField.getText();
StringSelection stringSelection = new StringSelection(myString);
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
clpbrd.setContents(stringSelection, null);
}
copyToClipboardButton.addActionListener(e -> {
String myString = outputField.getText();
StringSelection stringSelection = new StringSelection(myString);
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
clpbrd.setContents(stringSelection, null);
});
}