+ 2

Can we use LinkedList to store multiple items on a Jframe(GUI)...

i have this task from my school... *A car dealer stocks different cars for sale. He keeps the following data for each car: make, model, year of make, engine transmission type, fuel type, colour and price. Write a Java program (in an object-oriented way) that accepts details for any number of cars through a GUI. Upon clicking on a display cars button, the program should display in a GUI a list of cars with their details in the order they were entered.*

20th Apr 2018, 7:06 AM
Mompati Keetile
Mompati Keetile - avatar
3 odpowiedzi
+ 2
yeah....that am aware of ....what i want to know is" can i ,output all the infomation in jframe from" michal
20th Apr 2018, 7:59 PM
Mompati Keetile
Mompati Keetile - avatar
+ 1
you can use JList for every car in LinkedList you add there one element or use JTable, where you can create a column for each parameter of car
21st Apr 2018, 4:21 PM
michal
0
you can define a class Car with all the parameters then you put them into a LinkedList or ArrayList like LinkedList<Car> list;
20th Apr 2018, 4:08 PM
michal