On 2 oct, 09:55, hezjing <[EMAIL PROTECTED]> wrote:
> Hi
> I'm populating a FlexTable using setText(row, column, text).
>
> Here is what I did to clear the entire contents of a FlexTable,
>
> int count = myFlexTable.getRowCount();
> for (int i = 0; i < count; i++) {
> myFlexTable.removeRow(i);
> }
>
> Is there a more elegant way to clear a FlexTable?
The fastest is to create a new FlexTable to replace the old one (as
proposed by Walden).
If you can't (for whatever reason), then the above code won't work,
you have to count down:
int count = myFlexTable.getRowCount();
while (count > 0) {
myFlexTable.removeRow(0);
}
But let me reiterate: the fastest will be to throw away your current
table and create a new one.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---