-
Copying TextPane formatting to Word
Greetings, all. I'm fairly good with Java but new to Java GUIs, so hopefully you can help me out.
I'm writing a program that involves displaying user-inputted text in a JTextPane after formatting it with bold, italics, etc. using a StyledDocument. I want users to be able to copy that text into Word while keeping formatting intact; however, doing a simple ctrl-c/ctrl-v copy or using getText() just copies the text, no formatting.
I've tried fiddling with the Clipboard, DataFlavor, and associated classes, but StringSelection only copies plain text and I can't figure out how to make a Transferable class that will preserve formatting. Most if not all tutorials I can find only deal with plain Strings, which doesn't help with my problem.
Does anyone have any ideas on how I would go about doing this? Thanks in advance for any assistance.
Similar Threads
-
By brouse in forum VB Classic
Replies: 0
Last Post: 03-09-2007, 12:46 PM
-
By Berni HAN in forum VB Classic
Replies: 0
Last Post: 09-30-2002, 07:23 PM
-
Replies: 5
Last Post: 02-22-2002, 11:01 AM
-
By InNeedOfHelp in forum VB Classic
Replies: 0
Last Post: 02-14-2002, 11:49 AM
-
By Sven in forum VB Classic
Replies: 1
Last Post: 10-05-2000, 01:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks