TreeSet to Array
How I transform a TreeSet into Array[][] .. I neet for JTabel
[68 byte] By [
VafCata] at [2007-11-26 14:56:37]

I create this TreeSet:
File f=new File("medicamente.txt");
ts=new TreeSet(new Comparatorul());
if (f.exists())
{
try
{
br=new BufferedReader(new FileReader(f));
while ((l=br.readLine())!=null)
{
String[] s=l.split("/");
c=new Medicament(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
ts.add(c);
}
}catch(IOException ioe){ioe.printStackTrace();}
}
else System.out.println("Fisierul doesn't exist");
after this i want to make "ts" into "Array"
and after this create the JTabel:
table = new JTable( Array, columnNames );
> Which might or might not be in the order the OP> needs. That's why I asked.Yeah, sorry about that Rene. After reading the OP's 3 posts, I was (or am) under the impression the OP wasn't interested in understanding it.
> Yeah, sorry about that Rene.No worries. Your solution is a solution after all. Maybe it suffices.> After reading the OP's 3> posts, I was (or am) under the impression the OP> wasn't interested in understanding it.Same here. :)