View Single Post
Old 01-26-07, 07:23 PM   #19
Marvel_us
FOOL!
 
Marvel_us's Avatar
 
Join Date: Dec 2005
Location: Miami, Florida
Posts: 3,754
Default Re: Sigh, Java HW Help

Quote:
Originally Posted by rhink
Heh JTables can be a real pain in the ass, though this would be a relatively simple application of them. Swing is the worst part of working with java, imo. Extremely flexible, can do a lot with it, but it's also very complex if you do more than scratch the surface, and can be slow.

Marvel, you could certainly create a toString in your customer class that concatenated everything in the objects contained within.

As far as displaying them all.... well, you could pop up a new dialog using joptionpane for every single one, but that would require the user to click through each and every one. If you don't have a requirement to use a GUI, it's very straightforward just to iterate through a loop and do a System.out for each record you want to print. JTables would be a nice, neat way to list them, but they can be difficult to work with. Could also use a JTextArea. It really depends on what you're most familiar with, and exactly what the requirements for this project are.
I've got the toString methods and right now it's currently looping through the items on the list but like you said the user has to click through every item. There's nothing in my assignment objective that doesn't allow that but I think it sucks to have to click through.

How would you recommend displaying everything at once using a scroll window with joptionpane?
__________________
Main Rig
Intel Q6600 QUAD|| Gigabyte P35-DS3L ||XFX 7900GTX|| G.Skill 6GB PC2-6400 || OCZ Agility 60GB SSD || WD 320GB + WD Green 1TB HDD || Samsung 20" LCD || CoolMax 650W PSU ||

60gb PS3 Owner
PSNid: Marvel_us
Marvel_us is offline   Reply With Quote