wood burning stoves 2.0*
The moose likes Applets and the fly likes Capturing applet from other source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Capturing applet from other source" Watch "Capturing applet from other source" New topic
Author

Capturing applet from other source

mandlar suurla
Ranch Hand

Joined: Jun 11, 2008
Posts: 67

Is it possible to capture applet from other site and display it in swing application with some web browser component. Also there should be possible simulate the listeners.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Hello "kalli killa"-

Your display name doesn't sound particularly real. We have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Please take a moment to change it, which you can do right here.

As to your question, a browser will load applets from the same host where the HTML page containing the applet tag came from. It can't be from somewhere else. Is that what you're asking?

I don't understand the remark about listeners.


Ping & DNS - updated with new look and Ping home screen widget
mandlar suurla
Ranch Hand

Joined: Jun 11, 2008
Posts: 67

Ok i changed my name, but if i load full page and remove with DOM some elements which i dont need and render it with some web browser element?
But with listeners i thought, is it possible to make the mouse coordinates and simulate mouse click, i know it's possible with WinApi, but i haven't seen in java. Oh now i remember there is class Robot, but how has it made their mouse move and clicks ? :roll:
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Thanks for fixing your display name.

Unfortunately, the rest of your post confused me even more. You don't mention applets any more - is there still one?

What I understand is this: You have (or want) an HTML rendering component in a Java application. Through that you load some HTML page, which you then want to modify (remove some elements). Correct so far?

Then you want to simulate mouse clicks - on what? What is the mouse click targeted at?

Two HTML components I can think of are the age-old JEditorPane (part of Swing, supports HTML 3.2, but not CSS or JavaScript - so DOM manipulation is not easily accomplished). The other is Lobo (on SourceForge); it is more fully-featured and still being improved.
janne jounivich
Ranch Hand

Joined: Jan 11, 2005
Posts: 45
I have had good results with experimenting the following open source
project - JDesktop Integration Components (JDIC) project (https://jdic.dev.java.net/) and it is based on communication with user's default browser thus being able to understand DOM, javascript, css. JDIC component can easily be put inside Applet or java application.

Please check it out. You can find examples and code snippets from the above mentioned developer's page.

br
janne


----
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Capturing applet from other source
 
Similar Threads
Not able to redirect from servlet when called from applet
Applet and Database
Drag and dropping across applets
Generating HTML page from Applet
Printing from an applet