KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this code to demonstrate the problem: public static void main(String[] args) { JFrame frame = new JFrame(); frame.getContentPane().add(new JEditorPane("text/html", "Hello cruel world<br>\n<font color=red>Goodbye cruel world</font><br>\n<br>\nHello again<br>\n")); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } If you select all the text that appears in the frame once the app starts, you can copy it and paste it into MS Word, Apple's Pages, or Mail and the text is formatted correctly. But if you paste it into a pure text editor such as TextEdit, Smultron, or a Skype chat window all the pasted content is on one line. What can I do to make the text copied to the clipboard able to be pasted with newlines preserved? I'm running my code on Mac OS X 10.7
Tags (comma-separated)
Save Edits
Cancel