• 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

Preformating

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I am currently trying to use the HTML preformat tags in a JTextPane using the the HTMLDocument class.

This is the function where i apply the preformating



Now i am able to save the preformated text as HTML but the the problem starts when i read it back, there seems to be additional 2 carriage returns where there should only be one.
This occurs only when i read the HTML document using the html kit class but when i use a browser to read the html file there are no extra carriage returns.

The reading of the document is correct as this problem only occurs when the preformat tags are involved, else the problem does not exist at all.

This is how the reading of the document is done



As you can see its unlikely anything is wrong with it but do correct me if i am wrong.

My question is why do these extra carriage returns occur?

Am i applying the preformat tags wrongly somehow?

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
[ November 25, 2006: Message edited by: Richard West ]
 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

Anyone at all, any idea why this is happening?

Richard West
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic