pls i need help:am try to develop an application that handle balanced diet using various food list and price list.want them to be in a table such that once a food option is selected it display the price and the application should ask for amount you want to spend before the food option comes up. pls,advice on how to using the swing components to achieve this andpls with a sample code to help. thanks.
posted 9 years ago
this might be one way
a class called FoodItem this class contains the item description, price and food options add these "FoodItems" to a JList (or a JTable), displaying just the description and price when a foodItem is selected, show a modal dialog asking for amount to spend show the options (based on selection and price) - perhaps in a set of JLabels?
might get a better example if you post a sample food item, with price and options, then describe what happens with the options when e.g. $5.00 is selected for amount to spend and how the options would differ if spending was $50.00