Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to update a java browser dynamicly?  RSS feed

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a java browser. When a latest news come in, the browser should update the news immediately. In the common IE, you need to press Refresh to update it, or set time to update . But this is not good for me.

like this

if(isNewsComeIn() == true){
// update IE
javaIE.textArea.append("news came in");
}

Thanks
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not 100% sure I understand your question.

Are you wanting to write a Java browser?
Do you want an existing Java browser?
Are you wanting to manipulate IE from Java?

Hopefully this will help get us on our way.
 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Are you wanting to write a Java browser?
Do you want an existing Java browser?
Are you wanting to manipulate IE from Java?


I want to manipulate IE from Java.

something like this

if(newInfoComeIn() == true){
IE.someTextArea.append("new info";
}
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Edward Chen:


I want to manipulate IE from Java.

something like this

if(newInfoComeIn() == true){
IE.someTextArea.append("new info";
}


Not gonna happen with pure Java. You'll need JNI for this. This really doesn't have anything to do with Swing, so I am going to move it to the Other Java API's forum where they like to talk about JNI.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets can tell the browser it is in to load a document through the AppletContext class. Have your news page load an applet which can be informed when an update takes place. And be advised that an unsigned applet can only communicate with the server it was downloaded from.
You may also want to look into JEditorPane (tutorial here) which can display HTML and may be a better fit for your app.
[ June 29, 2004: Message edited by: Joe Ess ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!