Passing data in java between panels
Posted on 2009-03-30
I am writing a GUI that has many panels that are displayed through a controlPanel class. I have one panel that gets half the information for a new patient (called newPatientPanel) and then a new screen is called (called newPatientContPanel) to get the remainder of the new patient data (too much data to get to fit on one panel). Currently I can get the data entered on the newPatientPanel by creating many different get<VariableName> methods in newPatientPanel and having a corresponding set<VariableName> in the controlPanel and calling the set<VariableName> in the newPatientContPanel. It works, but I'm thinking there has got to be a better way. Can anyone point me in a better direction? Thanks!