Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table editor throws widget disposed error. Please help
Table editor throws widget disposed error. Please help [message #461476] Mon, 26 September 2005 04:22
Eclipse UserFriend
Originally posted by:

hello all,

i have an issue which i coudnt fix even after spending a lot of time. I am
not an expert in swt/jface, so i think i miss


Here is a brief of my wizard page.

public class PresentationLayerWizardPage extends ModuleBaseWizardPage{

private Table viewEditTable; // Table control

public void createControl(Composite parent) {

// create a Tab control
// create a Tab Item



public void getTableControl(){

viewEditTable = new Table(scrollableComposite,SWT.SIMPLE|SWT.H_SCROLL |

// set Table columns


public void setVisible(boolean visible) {


public void initializeTableGrid(){
// create TableItem
// create a table editor
// create a check box

TableItem item = new TableItem(this.viewEditTable,SWT.NONE);

TableEditor teditor = new TableEditor(viewEditTable);
teditor.grabHorizontal = true;
Button editorcheckbox = new Button(viewEditTable, SWT.CHECK | SWT.CENTER);

// set back color same as table grid back color

// set editor checkbox, on the specified cell ( row = row, column =
optionType )
item.setText(1,option.getView().toString()); // set underlying column

editorcheckbox.setSelection(option.getView().booleanValue()) ; // set

editorcheckbox.addSelectionListener(new CheckBoxListener(item,1));


private class CheckBoxListener implements SelectionListener{
TableItem tableItem;
int index;

public CheckBoxListener(TableItem tableItem,int index){
this.tableItem = tableItem; // selected row
this.index = index; // selected column

public void widgetSelected(SelectionEvent e) {


public void widgetDefaultSelected(SelectionEvent e) {


} // end of wizard class

First time everything works as i could check or uncheck the check boxes and
i am able to retrieve the status from it. please

look at the selection listner which set the TableItem.setText as the status
of the checkbox on each click.

Problem comes when i click 'back' button to go the same page and try to
chnage the check box status by clicking on it. Then

i got an exception saying 'Widget EXposed'. On debug i found that it causes
in the selctionListner when we try toset the

tableItem.setText on 'widgetSelected(SelectionEvent e)' method. I coudnt
figure out why and couldnt find a soltuins yet.
can anyone please give some ideas ??

Anyhelp would be highly appreaciated. Thanks a lot in advance.

Previous Topic:Transparent Window (SetLayeredWindowAttributes) without frame and controls
Next Topic:How can i get the real size of a Component?
Goto Forum:

Current Time: Sat Sep 21 19:34:42 GMT 2019

Powered by FUDForum. Page generated in 0.02554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top