Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
タイトルにあるように、Javaで色付き/スタイル付きのテキストをWindowsクリップボードにコピーするにはどうすればよいですか?
テキストは次のJEditorPaneように配置されています。
JEditorPane
JEditorPane je = new JEditorPane("text/html","a <font color=\"yellow\">banana</font>");
ctrlテキストを選択して+を押した後c、スタイルをアクティブにしたまま、テキストを単語でコピーして貼り付けます。
プレーンテキストとしてコピーすることはできません。CF_HTML またはリッチ テキスト形式を使用する必要があります。