Hey Everyone, this isnt really game related but I am having some problems creating a Java Swing application with multiple jpanels.
I am using the CardLayout which works great for switching between screens however my issue is with passing data. For example I have a MainPanel with a MenuScreen and SearchScreen, on my MenuScreen I have a textbox which one enters a phone number and hits search. This should then switch the screen to the SearchResult screen which will display the results of a SQL Query using the number provided on the MenuScreen.
I am wondering, if I am using a cardlayout on the MainPanel which I call in order to switch screens, how do I pass the new screen the phone number value?