Results 1 to 6 of 6
  1. #1
    anix is offline Member
    Join Date
    Jun 2010
    Posts
    7
    Rep Power
    0

    Default to pass a parameter from a jframe children to its jframe mother

    Hello,

    I call a jframe children from a jframe mother by this:
    authentification a = new authentification();
    a.setVisible(true);
    a.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE );
    my question is:
    how to pass a value of a variable from the jframe children to the jframe mother

    thank you

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,515
    Rep Power
    25

    Default

    To pass value of a variable: Use a method.
    in child:
    mother.method(value);

  3. #3
    anix is offline Member
    Join Date
    Jun 2010
    Posts
    7
    Rep Power
    0

    Default

    thank you
    I haven't a variable mother
    and what metod you mean

  4. #4
    Sno's Avatar
    Sno
    Sno is offline Senior Member
    Join Date
    Apr 2010
    Posts
    196
    Rep Power
    5

    Default

    what....
    how to pass a value of a variable from the jframe children to the jframe mother
    jframe mother.... is an object variable

    mother.method(value);

    Not sure on the method question, it is easier for us to deciper if you show us all your code.
    :rolleyes: ~ Sno ~ :rolleyes:
    '-~ B.S. Computer Science ~-'

  5. #5
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,515
    Rep Power
    25

    Default

    In the mother class you would define a method named method:
    ...
    public void method(<args here>) {
    .. save the args or ???
    } // end

  6. #6
    anix is offline Member
    Join Date
    Jun 2010
    Posts
    7
    Rep Power
    0

    Default

    it is ok now thank you
    Last edited by anix; 06-14-2010 at 07:59 PM.

Similar Threads

  1. how to pass parameter from one jsp to another jsp
    By kader_sit in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-10-2010, 02:04 PM
  2. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  3. Jframe pass variable to Applet
    By wayn in forum AWT / Swing
    Replies: 0
    Last Post: 03-10-2010, 09:54 AM
  4. Passing data from one JFrame to another JFrame
    By tarami in forum New To Java
    Replies: 3
    Last Post: 08-06-2009, 05:44 PM
  5. Replies: 4
    Last Post: 04-22-2009, 11:02 PM

Posting Permissions

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