04 May 2005 - java_dev (original) (raw)

| | 09:55 pm - kirika_phoenix - Gui message passing 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? | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |