Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-10-2008, 01:13 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
Generate an event to another java application
I'm not an advanced user but this question is directed to advanced users

I have an already created java application, which code i can't modify. My purpose is create another application which can control the first one.

I mean, the first one have a button called RUN and an actionPerformed method associated to it. Then i have to do that this event is called from the other application whitout clicking this button in the first one.

I´m spanish so my english is no so good. Sorry!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-10-2008, 01:16 PM
sanjeevtarar's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Are you using a web application or else. Please give some more details about your question.




sanjeev
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 09:12 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
No. The application that i'm trying to "control" is a .jar file, is not a web application, you can run it in your computer just having Java Virtual Machine and executing the .jar file.

My purpose is to know if is possible to control one application already created from other application.
If you need more details please tell me
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 08:17 AM
sanjeevtarar's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
Can you send that jar.. so that i can check what exactly it is.


sanjeev
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-11-2008, 08:42 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Are you trying to execute a jar file from a button event? I think because of the jar you say that in the first post,

Quote:
I have an already created java application, which code i can't modify.
Is that right. If not correct me.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-14-2008, 03:43 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
No, Eranga.
I need to execute a button of an application from another different application. It means, i need to generate the onClick button event from my application to annother one.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-16-2008, 09:40 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
What you mean generate onClick button event? I'm not clear what you say here pal.

Again, did you want to generate a onClick button event on a application by another application?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 04-16-2008, 02:35 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
Yes. I want to generate an event to one application from another one.
The first application has a Botton which has associated an actionPerformed event. I'll need to call this event from the other application.
I think it must be possible but i don't know how!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!
HELP!!!
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 04-16-2008, 02:43 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Did you work on any Java IDE?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 04-16-2008, 03:26 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
I'm working with jBuilder.
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 04-16-2008, 03:27 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
but i can work with any other java IDE if it's better
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 04-16-2008, 03:40 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
No no, I'm not worried about your IDE. My question is that, when you create a actionPerformed method, what is the access modifier of it? I think it is private.

__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 04-16-2008, 03:48 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
OK!
The application that has the button is already created and i can't modify it. But i saw its code decompiling with an application called JAD.
Then, it has a class named MyActionListener which catch all events and watches which is the event type.
The code of this class is

private class Osejs$MyActionListener
implements ActionListener
{

public void actionPerformed(ActionEvent _evt)
{
String cmd = _evt.getActionCommand();
if(cmd.equals("New"))
{
if(!isEmersionConnected() && isApplet)
{
Args[0] = cmd;
if(htmlWindow != null)
htmlWindow.call("ejsCommand", Args);
}
if(readOnly)
{
JOptionPane.showMessageDialog(Osejs.access$500(Ose js.this), Osejs.access$600().getString("Osejs.ReadOnly.Messa ge"), Osejs.access$600().getString("Osejs.ReadOnly.Title "), 1);
return;



and continuous. So, i need from the other application, to generete an event that this class can capture and treat it
Bookmark Post in Technorati
Reply With Quote
  #14 (permalink)  
Old 04-16-2008, 03:50 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
If i don't explain right in english please tell me and i'll try do it better
Bookmark Post in Technorati
Reply With Quote
  #15 (permalink)  
Old 04-16-2008, 03:53 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,405
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Ok, Here what happened is, that ActionLitener deals with the ActionEvent. As you can see in the above code it's get the action command, that is the text of your control. So try to do the same thing on the other class and check it on this class. If you pass the test, simply call the correct functions. I don't think you can generate the code there.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on July 13, 2008)
Bookmark Post in Technorati
Reply With Quote
  #16 (permalink)  
Old 04-16-2008, 03:58 PM
Member
 
Join Date: Apr 2008
Posts: 9
i_berbeu is on a distinguished road
you say that

So try to do the same thing on the other class and check it on this class.

But it implies to change the code of the program. And i can't do it. I only can create another program to controll it. You know what i mean????? Maybe is possible that i don´t understand you too.
Bookmark Post in Technorati
Reply With Quote
  #17 (permalink)  
Old 04-23-2008, 07:03 PM
danielstoner's Avatar
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 183
danielstoner is on a distinguished road
You have to bypass the whole GUI code in the jar file. If you are lucky enough the classes that do the job when the button is clicked are public and have public interfaces. In that situation you can call them directly from your application and use the jar file as a library. If the API is not public you might still stand a chance by declaring your classes in the same packages as the classes you want to call. Hope this helps.
__________________
Daniel @ [
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
]
Language is froth on the surface of thought
Bookmark Post in Technorati
Reply With Quote
  #18 (permalink)  
Old 05-12-2008, 02:55 PM
Member
 
Join Date: May 2008
Posts: 4
indula is on a distinguished road
yes. i am using web application. i want pagination in jsp.
Bookmark Post in Technorati
Reply With Quote
  #19 (permalink)  
Old 05-12-2008, 02:57 PM
Member
 
Join Date: May 2008
Posts: 4
indula is on a distinguished road
i want immediately code for pagnation in jsp
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference btwn java.awt.* and java.awt.event.* ahdus New To Java 5 11-17-2007 07:07 PM
addActionListener(java.awt.event.ActionListener) in java.awt.Button cannot be applied mathias Java Applets 1 08-06-2007 09:49 AM
How to generate random number in java fernando New To Java 1 08-01-2007 08:32 PM
How can I generate MsWord from java? simon Advanced Java 2 08-01-2007 05:40 PM
JBoss and Java 6:Exception occurred during event dispatching Ed Advanced Java 2 07-04-2007 06:23 AM


All times are GMT +3. The time now is 12:41 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org