Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Capturing applet from other source

 
Ranch Hand
Posts: 67
PHP Debian Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
mandlar suurla
Ranch Hand
Posts: 67
PHP Debian Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic