I think I didn't explain myself... What was happenning was that, after
creating the table model and fillin it up with data, If I used the object
for anything else (let's say read the getRowCount property) before
asigning it to the JTable, and then Asigne it to the JTable, it ould not
show any data. But I solved the problem by making a copy of the table
model to read any other information, leaving one copy untouched for the
JTable.... It just seemed odd...
Thanks again!
On Fri, 14 Sep 2001, Greg Munt wrote:
> If you have not assigned the model to the table, it is reasonable to expect
> the table not to show any data.
>
> A JTable knows nothing about data, except that it requests it from a table
> model. If you have not assigned a model to the table, it will have the
> default (empty) model assigned to it.
>
> Perhaps I am misunderstanding your question?
>
> -----Original Message-----
> From: Alexander Wallace <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Thursday, September 13, 2001 07:27
> Subject: TableModel Error/Bug?
>
>
> >Hello there! I have a question... I create a table model for a JTable, It
> >all works fine... But if I try to access methods on the custom table model
> >I made, like the getRowCount() before asigning the model to the JTable,
> >the method seems to be emptied, becouse the JTable shows nothing... Is
> >there a logical reason for this?
> >
> >Thanks!
> >
> >
> >_______________________________________________
> >Swing mailing list
> >[EMAIL PROTECTED]
> >http://eos.dk/mailman/listinfo/swing
>
>
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing