Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Rendering HTML  RSS feed

 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Is there a way/hack to render HTML at real time from stream in HTMLEditorKit?
.. or is there some opensource renders to do the job? don't offer native stuff or commercial products.. thans.

The page what i will render is continuous, and it won't never stop, so i need to render it in real time.

HTML is very simple, it contains only text and images.

Thnx, Artsi
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arto

Not really sure what you mean. Most simple html pages have a beginning and an end, and you start from the top till you get to the bottom (end of html) and then stop.

Would you see the text changing or only the pictures? Hope you're not confusing html with streaming video!

You could put the html client/renderer in a loop, since swing double buffers it should not blink unless different data arrives.

hth
Ed
 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I need actually what i wrote.

I need to render html (no stream) same time when i read it from stream, because stream is continuous and won't end. Like opera browser, when there is LONG html page, it will something from it when stream has not end yet.

in server side i can write <html><body>xxxxx every new connection without end, and if xxxxx is just text and images, it should be no problem to draw.

well.. application is chat room, and if people chat many hours, there could be so much data that it is not good idea to make loop, because rendering long page one time in second could be too much for slow computers.
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arto,

Someone else might want to comment on long unending html screens.

Most chat screens I have seen have different sections.
a. heading (room title)
b. those present in the room
c. the actual chat - a text area with scroll bars
d. a text area to in which to type responses (could be a form in html)
e. whatever else you want to display

You would need some javascript code to refresh each of these periodically if your client is purely html.

Are you intending to write any java code? That could update each section as appropriate periodically.

Ed
 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chat software has already done, and it work's with html/javascript/common browsers.
Now i want to make java standalone client for that web interface.
JEditorPane won't repaint until end of the stream has occured.
[ May 17, 2005: Message edited by: Arto Pastinen ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!