r/JavaFX • • Aug 22 '20

ArrayList - Getting items

I am doing order class

And because order is dependency on the menuitem class... and because it has the arrayList and i can't ask user to enter the items to be added in the list, thus what code must i write in order to get the items and to be able to view the items

ClassDiagram, my written codes and my output is all in the screenshot below

0 Upvotes

3 comments sorted by

View all comments

0

u/[deleted] Aug 22 '20

[deleted]

2

u/JKDSD100 Aug 22 '20

I am trying to get the items displayed, but the items in viewAllOrder() is empty.. Since it is arraylist so i can't ask the user to enter the items that they want thus i don know how to get the items to be added and display everything... My output is shown above

0

u/[deleted] Aug 22 '20

[deleted]

1

u/JKDSD100 Aug 24 '20

So i will need 2 nested for loop? or i can use 1 nested to do all the things?