Re: How to save/load JTextPane to/from file?
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 23 Jan 2008 05:25:07 GMT
On Tue, 22 Jan 2008 18:55:56 -0800 (PST), hiwa <HGA03630@xxxxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :
. How to save it onto a file and load back it
onto a new JTextPane?
do a getText and save that the way you would any other string,
perhaps with a Writer, a ObjectStream, or a DataOutputStream.
see http://mindprod.com/applet/fileio.html
for sample code.
Don't try to serialize the JTextPane itself. You won't necessarily be
able to read it back under a different version of Java.
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
.
- References:
- How to save/load JTextPane to/from file?
- From: hiwa
- How to save/load JTextPane to/from file?
- Prev by Date: How to save/load JTextPane to/from file?
- Next by Date: how do you disable checkbox from formAction class in struts framework?
- Previous by thread: How to save/load JTextPane to/from file?
- Next by thread: how do you disable checkbox from formAction class in struts framework?
- Index(es):
Relevant Pages
|