JTextComponent からコピー アンド ペースト メソッドを取得する際に問題が発生しています
私のプログラムでは、メニューの選択肢となる文字列の配列があります。「コピー」と「貼り付け」はその 2 つです。
else if (e.getActionCommand().equalsIgnoreCase("Copy"))
{
JTextArea a = new JTextArea();
a.setEditable(true);
a.copy();
}
else if (e.getActionCommand().equalsIgnoreCase("Paste"))
{
JTextArea a = new JTextArea();
a.setEditable(true);
a.getSelectedText();
a.paste();
}
エラーメッセージは表示されませんが、機能していません。任意の助けをいただければ幸いです