Hi. I was wondering how I could pass some values from one program to
another. I'm writing a simple program. It's GUI based, and I extend
JFrame. I have some menus. One of these is a preferences menu, which is
another JFrame. I wrote a static function in the main program to allow
the preferences program send some values to the main program. Now, in
this static function, I would like to call connect(), a non-static
function. Is there any way I could go about doing that?
Roy Goodman - 21 Mar 2005 02:56 GMT
Amol Vaidya <mynewsa@gmail.com> wrote in news:Nao%d.7838$ot.5078
@tornado.texas.rr.com:
> Hi. I was wondering how I could pass some values from one program to
> another. I'm writing a simple program. It's GUI based, and I extend
[quoted text clipped - 3 lines]
> this static function, I would like to call connect(), a non-static
> function. Is there any way I could go about doing that?
You have to create an instance of the object that the connect() method is
in:
Class1 c = new Class1();
c.connect();
Something like that.
Roy