🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11286

RTF in JTextPane

#11286
From: Monica
Date: Wed, 16 Jun 1999 00:00
24 lines
1141 bytes
Hi :o)

I have a java program witch uses the RTFEditorKit. When I copy text from

this program to the clipboard it seems to copy it as plane text and not
rtf. Must the clipboard be set to read rtf? If yes, how ?

To illustrate:
    TextPane.setContentType("text/rtf");
    v_kit = new RTFEditorKit();
    TextPane.setEditorKit(v_kit);
    v_context = new StyleContext();
    v_doc = new DefaultStyledDocument(v_context);
    TextPane.setDocument(v_doc);

Then to copy, cut and paste I use:
    TextPane.copy();
    TextPane.cut();
    TextPane.paste();

I hope that someone can help me.

Monica :oD
A Norwegian IT-student
Technical Details
Message-ID: <376740B7.3D66B3A0@ifi.ntnu.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,ff72ffe1e29ee94d,start
X-Google-Attributes: gid111d45,public
From: Monica <oshea@ifi.ntnu.no>
Subject: RTF in JTextPane
Date: 1999/06/16
Message-ID: <376740B7.3D66B3A0@ifi.ntnu.no>
X-Deja-AN: 490144595
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing