[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Unable to dispose TableColumn
|
Reverse the order of your loop:
System.out.println("before dispose" + table.getColumnCount());
for(int i = table.getColumnCount() -1; i <= 0; i++)
{
table.getColumn(i).dispose();
}
System.out.println("after dispose " + table.getColumnCount());
"Neeraj" <neerajkrishnag@xxxxxxxxx> wrote in message
news:8002e17c8c0453ceb41f50e447957a62$1@xxxxxxxxxxxxxxxxxx
>I am not able to delete all the columns in the table? The following code
>will help you, i think.
> System.out.println("before dispose" + table.getColumnCount());
> for(int i = 0; i < table.getColumnCount(); i++)
> {
> table.getColumn(i).dispose();
> }
> System.out.println("after dispose " + table.getColumnCount());
>
> The result i got was:
> before dispose : 8 after dispose : 4
>
> Initially there were 8 columns
> Please suggest a way to delete all the columns.
>