AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HTML, JTextPane

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Manfred W.
Guest





PostPosted: Sun Jun 29, 2003 4:05 pm    Post subject: HTML, JTextPane Reply with quote



Hi!

I spent an awful LOT of time playing with SWING HTML editing support in
JTextPane, and encountered loads of problems. One easy to verify is the
following (reproducable in the HTMLProcessor Application
http://www.manning.com/sbe/ swing2e.zip Examples):

I have problems, setting a correct paragraph style in the HTML Editor.
Example:
- start Chapter20/8 HTMP Processor
- enter some lines of text
- select a paragraph and apply CODE style
- everything looks ok now.
- enter a new line inside the CODE paragraph an type something.
- the new paragraph ist shown centered and not in FixedFont width
- the html code seems ok, the view is messed up!
- view source and save source, some CODE paragraphs are gone!

(How) can this be circumvented?

The only solution I found was rather ugly: get the paragraph html via the
Kit.Writer, strip html, head, body, first p and enclose it in with a CODE.
Then remove the paragraph and insert the string again with kit.read.

Is there some good documentation on the HTML Editing features, maybe stating
what is implemented, and what not? (Besides javadoc and sourcecode and sun
documentation)

Is it better to work with ParagraphStyles on an HTMLDocument or work
directly
with elements?

It seems that SWING HTML editing is either broken or only partly implemented
or I am getting something terribly wrong.

Is HTML editing feasable for a large project, or is it better to wait for a
better implementation (JDK1.5?)? Thanks


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.