Results 1 to 4 of 4
  1. #1
    rpc86 is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default Passing value from JFrame to JDialog

    Hi guys,

    I'm a new member here. Welcome to me

    Just need to know how to pass values from my JFrame to JDialog?

    Say I have jTextField in my JFrame. The value input from jTextField would be passed to jLabel of JDialog when JDialog is displayed.

    JFrame is the parent and JDialog is the child form.

    Please help me. I'm new in Java Swing.

    Many thanks.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Passing value from JFrame to JDialog

    You pass information in Swing same as with any code in Java. Hard to say what your specific problem is based on your current description though.

  3. #3
    rpc86 is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default Re: Passing value from JFrame to JDialog

    Quote Originally Posted by Fubarable View Post
    You pass information in Swing same as with any code in Java. Hard to say what your specific problem is based on your current description though.
    Just like in Java?

    I tried adding getter and setter in JDialog but nothing happens.
    Could you post sample codes?

    Thanks.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. How to show JDialog is a JFrame ?
    By xuanhung123 in forum AWT / Swing
    Replies: 6
    Last Post: 07-21-2010, 04:32 PM
  2. passing an object from one JDialog to Jframe
    By sinha in forum AWT / Swing
    Replies: 7
    Last Post: 12-16-2009, 05:56 PM
  3. Communicate JFrame with JDialog
    By BeRniTo in forum AWT / Swing
    Replies: 2
    Last Post: 08-31-2009, 03:07 PM
  4. Returning data from a JFrame/JDialog?!
    By Joe2003 in forum AWT / Swing
    Replies: 6
    Last Post: 01-08-2009, 01:14 AM
  5. problems with jDialog in a JFrame
    By bbq in forum AWT / Swing
    Replies: 1
    Last Post: 07-05-2007, 05:14 AM

Posting Permissions

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