他のプログラムで Ctrl-V を実行できるように、クリックすると内容全体がクリップボードにJTextArea
コピーされるボタンがJTextArea
必要です。System
私はこれを試しましたが、運がありません。これが私が試したものの例です:
StringSelection stringSelection = new StringSelection("This is a clipping");
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents( stringSelection, null );