This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Im working with a multi page GUI. Each page has numerous text entry fields (3-5) for specific pieces of data. Each page also has a number of buttons (confirm, reset, go back etc...).
The program is structured so that the button you click directs you to a specific and unique page. This goes for up to four pages before returning to the title page.
I am using the card layout currently, though I am not tied to it. My question is this:
What is the best way to detect actions within the currently viewed page so that i can direct people to the correct next page? I have the cardLayout aspect working just fine - ie all pages are in the card layout, and viewable if hardCoded to do so, but I'm not sure how to track events in this circumstance. I have seen this code on other forums (Credited to Fubarable on Java Forums):
The last line is the lline I am interested in, and I am going to play with that a bit and see if I cant apply it to what I am doing. My main problem is that it is "new FirsPanel(firstPanelActionListener)" - does this add both a new instance of FirstPanel and its assoiciate action listener? Curious if anyone else has suggestions?
Joined: Mar 21, 2011
Ok sorry for the double post: here is my cardLayout code;::
You may notice that two of the pages follow a different naming convention. I had partners in this project - basically they turned into flakes. In a mighty fit of lazieness im trying to not redo those two pages, because i dont wanna.