Message passing between gui components

Discussion in 'Java' started by kirikaphoenix@gmail.com, May 4, 2005.

  1. Guest

    I'm a bit of a java newbie so you'll have to forgive me. I'm creating a
    gui in Swing and have multiple parts of it split up into several
    classes.
    The problem im having is that I have data in JTextField's in one part
    of the class that I need to read from another part of the gui that is
    from another class. All of the gui's classes are instances but I don't
    know how to reference each part of the gui in order to get that data.

    I can't write a method to return the data as I don't have a non static
    reference to call it from. An ActionListener wouldn't work as the field
    is uneditable and just holds the data (the data itself is written into
    the field by the class).

    Is there a particular Listener or method message passing that I can use
    to get the data?
     
    , May 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mickey Segal
    Replies:
    0
    Views:
    923
    Mickey Segal
    Feb 2, 2004
  2. paul.foreman

    GUI - GUI value passing

    paul.foreman, Oct 22, 2004, in forum: Java
    Replies:
    5
    Views:
    782
    Michael Rauscher
    Oct 25, 2004
  3. Jan Danielsson

    "Message passing"?, and a GUI question.

    Jan Danielsson, Jan 3, 2005, in forum: Java
    Replies:
    4
    Views:
    574
    Andrew Thompson
    Jan 4, 2005
  4. j_mckitrick
    Replies:
    5
    Views:
    342
    David Bolen
    Jun 11, 2004
  5. Martin
    Replies:
    1
    Views:
    393
    Mike Treseler
    Dec 13, 2006
Loading...

Share This Page