is it possible to connect 2 java applications in different packages ?
I have written 2 different applications ( so they are 2 different projects/packages). How can I do : by clicking a button in a jframe in first app, the jframe in second app appears ? for example first app is "login" and second app is "register a new user". It has a button in login jframe which clicking that, leads to "register a new user" in application 2 !
I do not want to integrate 2 applications because it gave me so many errors. I just want to make a connection between them. is it possible ??
Re: is it possible to connect 2 java applications in different packages ?
What do you mean by a "connection"?
One easy way to start the execution of a class that has a static method (main is static) is to call that static method.
Another way is to call a constructor of a class. Ie use new to create an instance of the other class.
Re: is it possible to connect 2 java applications in different packages ?
I mean : by clicking a button, the second jframe from another package may shown . the second jframe has separate functionality than the first jframe (from first package)
Re: is it possible to connect 2 java applications in different packages ?
Quote:
by clicking a button,
Add a listener to the button. When the listener method is called, use one of the techniques listed in post#2 to call the other class's methods.