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() {
|
copyToClipboardButton.addActionListener(e -> {
|
||||||
@Override
|
String myString = outputField.getText();
|
||||||
public void actionPerformed(ActionEvent e) {
|
StringSelection stringSelection = new StringSelection(myString);
|
||||||
String myString = outputField.getText();
|
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||||
StringSelection stringSelection = new StringSelection(myString);
|
clpbrd.setContents(stringSelection, null);
|
||||||
Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
|
|
||||||
clpbrd.setContents(stringSelection, null);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue