Switch to lambda
This commit is contained in:
parent
249e6994db
commit
38f0ee78b2
1 changed files with 5 additions and 8 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue