+ 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.*
3 odpowiedzi
+ 2
yeah....that am aware of ....what i want to know is" can i ,output all the infomation in jframe from"
michal
+ 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
0
you can define a class Car with all the parameters
then you put them into a LinkedList or ArrayList
like
LinkedList<Car> list;