Results 1 to 5 of 5
  1. #1
    cachente is offline Member
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    0

    Default Act on a not displayed applet

    Hi everybody,

    First, say hello. I'm a spanish girl new in this forum and new in Java so i hope to have a good experienci with you.

    I have to implement a new thread for a bigger java program which the next performance.

    An applet is running when opening a URL (IANA — Example domains). This applet have buttons, progress bars, input dialogs, etc. My program have to automattically operate with this applet, i mean, from the main java program open the URL, click buttons in the applet, etc.

    I tried to to that with the robot class, that allows me to move the mouse, press buttons, etc. The problem is that i have to do that with the applet not displayed, minimized or hidden, and the robot class uses screen pixels so the window must be in front to work with it.

    I'me not asking for classes or methods. I just wan't to know if this way of working is possible with java or i'm trying something impossible.

    Thanks everybody and sorry for my english!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Act on a not displayed applet

    My program have to automattically operate with this applet
    The problem is that i have to do that with the applet not displayed,
    I'm not sure I understand what you are trying to do.
    If the browser window that is holding the applet is not displayed, then there is no way to use the mouse/cursor to send the applet events.
    What are the steps for doing your task? Are they something like this:
    Open a browser
    Load a URL with an applet
    Start the java app that uses the Robot class
    Have the java app use the Robot class to send events to the applet being shown in a browser window

  3. #3
    cachente is offline Member
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    0

    Default Re: Act on a not displayed applet

    Hi,

    Soorry if i didn't explain it very well... i'll try again. My steps, as you told, are:

    1) Open a web where a applet will run in. That web and the applet already exist and i can't modify them or know their code. So, the existing app can't receive new events or something like that.

    2) I have to login the page. I know how to do it from JAVA with a line like that:
    Desktop.getDesktop().browse(new URI("http://user:pass@192.168.1.12/svn/"));

    3) The user can operate with the applet, clicking buttons, etc.

    That's the normal operation and i have been told to make this "user transparent". I mean that i need to develope a program that make de full operation just clickng a button in a new applet.

    When i previously said that the window is not displayed i meant that the user can't see internet explorer oppening, the mouse moving, etc. He can only see the new application.

    when i talk about the Robot class is becaus it was my first idea to do that, before i know that the user shouldn't see the window with the old application. I agree with you in discarding this option.

    I don't know if there is a way to do that. I'm very confused...

    Thanks for your answer!!!!!!!!!

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Act on a not displayed applet

    If the applet is not visible, then I don't think you can send it events using the Robot class or with the keyboard or the mouse.

    You can write a program that replaces the applet and communicates directly with the server from your application.
    It might be possible for You to write a program that reads the applet class files from the server and uses them internally to do what you want. No idea if you could send the applet code events to control it.

  5. #5
    cachente is offline Member
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    0

    Default Re: Act on a not displayed applet

    Thaks again for your reply,

    I have to talk with my project managers to change the way to do that... I thing that this is impossible to do like they say.

    I'll try to post it if i found a good solution for my problem.

    Bye!!

Similar Threads

  1. TextField not displayed
    By weezy2894 in forum Java Applets
    Replies: 6
    Last Post: 04-18-2011, 03:37 AM
  2. output is not displayed
    By meth in forum New To Java
    Replies: 0
    Last Post: 01-07-2011, 06:44 AM
  3. java.awt.HeadlessException Applet not displayed
    By sunjavaboy in forum Advanced Java
    Replies: 3
    Last Post: 01-15-2009, 08:13 PM
  4. displayed the rownumbers
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 03:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •