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

Got ya, I would only need it to be local to that method right? I don't see a need to have it declared as an instance variable for that class. So this is what I have:

Quote:
public void DisplayList()
{
String r ;

for(int i = 0; i < accounts.size(); i++)
{
Customer c = accounts.get( i ) ;

String s = c.toStringCustomer() ;

r += s ;
}

JTextArea text = new JTextArea(r, 40, 40);
JScrollPane pane = new JScrollPane(text);


JOptionPane.showMessageDialog(null, pane, "Account Information",
JOptionPane.INFORMATION_MESSAGE);
}
}
__________________
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