Results 1 to 5 of 5
Thread: Act on a not displayed applet
- 09-09-2011, 09:38 AM #1
Member
- Join Date
- Sep 2011
- Posts
- 5
- Rep Power
- 0
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!
- 09-09-2011, 01:58 PM #2
Re: Act on a not displayed applet
My program have to automattically operate with this appletI'm not sure I understand what you are trying to do.The problem is that i have to do that with the applet not displayed,
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
- 09-09-2011, 02:21 PM #3
Member
- Join Date
- Sep 2011
- Posts
- 5
- Rep Power
- 0
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!!!!!!!!!
- 09-09-2011, 02:30 PM #4
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.
- 09-09-2011, 02:37 PM #5
Member
- Join Date
- Sep 2011
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
TextField not displayed
By weezy2894 in forum Java AppletsReplies: 6Last Post: 04-18-2011, 02:37 AM -
output is not displayed
By meth in forum New To JavaReplies: 0Last Post: 01-07-2011, 05:44 AM -
java.awt.HeadlessException Applet not displayed
By sunjavaboy in forum Advanced JavaReplies: 3Last Post: 01-15-2009, 07:13 PM -
displayed the rownumbers
By geeta_ravikanti in forum JDBCReplies: 1Last Post: 04-22-2008, 02:30 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks