Reputation: 29
I am developing a swt
application where I want to dispose a button and again want to recreate that in the same place. But I am getting widget is disposed error. How can I do it?
o
Upvotes: 2
Views: 702
Reputation: 96
If you are not using GridLayout, you can set button invisible invoking Control:setVisibile(boolean)
.
Upvotes: 0
Reputation: 3241
You can try alternate paths... that is not disposing a button but just hiding it. If you are using a GridLayout
you can use GridData#exclude
to ensure the button is hidden and its space is utilized by others.
Upvotes: 1