🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JTextPane.write() does nothing

#12237
From: Dezo
Date: Tue, 02 Feb 1999 00:00
38 lines
2100 bytes
I'm using JBuilder 2.01 w/ JDK 1.1.6 and Swing 1.0.1. I have code similar to
this:

  JTextPane editorPane;  // attached to a dialog

  // set the contents of the editor pane in the dialog (i.e. by user edits)

  String path = "c:\temp\";
  String fileName = "anyfile.txt";
  File file = new File(path+fileName);
  editorPane.write(new FileWriter(file));

The file gets created but it is always 0 bytes. No matter what the contents
of the editorPane are. Why? Is this a known bug? Or am I missing something
simple?

--
--
                                   __
Barry DeZonia                    .'  '.
                                :      :
Systems Futzer                  | _  _ |
                             .-.|(o)(o)|.-.        _._          _._
UW-Madison                  ( ( | .--. | ) )     .',_ '.      .' _,'.
                             '-/ (    ) \-'     / /' `\ \ __ / /' `\ \
Forest Landscape Ecology Lab  /   '--'   \     /.'     \.'  './     '.\
                              \ `"===="` /     `       : _  _ :       `
#110 Russell Labs              `\      /'              |(o)(o)|
                                 `\  /'                |      |
1630 Linden Drive                /`-.-`\_             /        \
                           _.-"`\._/V\_./`"-._       /   .--.   \
Madison, WI 53706        .'/     \ /^\ /     \'.     |  (    )  |
                        / /       \| |/       \ \    _\  '--'  /__
608-265-6321           / /         \_/         \ \ .'  '-.__.-'   `-.

http://flel.forest.wisc.edu/staff/barry/

        (Wallace & Gromit courtesy of Joan Stark <spunk1111@JUNO.COM>)
Technical Details
Message-ID: <797o3d$guu4@forums.borland.com>
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,77160b643136c12e,start
X-Google-Attributes: gid111d45,public
From: "Dezo" <NoInfoFor@Spammers.com>
Subject: JTextPane.write() does nothing
Date: 1999/02/02
Message-ID: <797o3d$guu4@forums.borland.com>
X-Deja-AN: 439901790
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0
Newsgroups: borland.public.jbuilder.java.swing