Hi all.
Following is my requirement, it is similar to asking a user to confirm a list of things he wishes to buy on the Net:
Step (1) User logs in;
Step (2) Selects various sandwiches, what they like to have on it and quantities;
Step (3) User selects other products e.g. drinks, pasta dishes etc
Step (4) Steps 2 and 3 can be repeated again for different products e.g. pasta and ceasar salat (pasta and salats have different JFrames);
Step (5) On clicking the review button, the user is taken to the confirmation screen where the user can view all the items he has selected, along with quantities and price.
Step (6) On clicking JButton confirm, the order is placed.
I've used a series of JFrames, passing parameters from one to the other. At the end of the chain in the confirmaton JFrame.
This is my question: how to I pass the selected items from multiple JFrames e.g. from the sandwich JFrame, the pasta JFrame and the drinks JFrame to the last JFrame containing the list of items and quantities the user has selected?
I've no problems passing parameters from one JFrame to the next, but from many JFrame to one?
Should I be using a background helper class with an array declared public static final and add the items from the other JFrames?
Any hints, tips, links and suggestions appreciated.
Following is my requirement, it is similar to asking a user to confirm a list of things he wishes to buy on the Net:
Step (1) User logs in;
Step (2) Selects various sandwiches, what they like to have on it and quantities;
Step (3) User selects other products e.g. drinks, pasta dishes etc
Step (4) Steps 2 and 3 can be repeated again for different products e.g. pasta and ceasar salat (pasta and salats have different JFrames);
Step (5) On clicking the review button, the user is taken to the confirmation screen where the user can view all the items he has selected, along with quantities and price.
Step (6) On clicking JButton confirm, the order is placed.
I've used a series of JFrames, passing parameters from one to the other. At the end of the chain in the confirmaton JFrame.
This is my question: how to I pass the selected items from multiple JFrames e.g. from the sandwich JFrame, the pasta JFrame and the drinks JFrame to the last JFrame containing the list of items and quantities the user has selected?
I've no problems passing parameters from one JFrame to the next, but from many JFrame to one?
Should I be using a background helper class with an array declared public static final and add the items from the other JFrames?
Any hints, tips, links and suggestions appreciated.