• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Copy & Paste from a JEditorPane

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fellow programmers,
I'm trying to figure if there is an easy way to add copy & paste
with the system clipboard to my Java application, more concrete to a JEditorFrame in a JInternalFrame?
Typically users would copy text written in Word and paste it into my application for ease. From what I've read it's not possible to get simple markup along (like bold, italics etc), I don't suppose this have changed? (the JEditorFrame is used for HTML).
I'm grateful for all help and hints.
Thomas
 
Thomas Hansen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found a solution to this problem which works well with my JEditorPane and that is using these actions:
cut-to-clipboard
copy-to-clipboard
paste-from-clipboard
Which is among the 83 actions I get when I asked my JEditorPane which actions it supported when I had contenttype set to "text/html".
A more general solution would be better so if anyone knows of another way, please speak out.
More details are available if someone needs it.
Regards,
Thomas
reply
    Bookmark Topic Watch Topic
  • New Topic