• 0

[Java] DisposeListener


Question

I want to add a DisposeListener, so that when the shell is closed, the following command gets executed

histLbl.setText("");

Im using SWT FormLayout if that matters. I tryed several things, but allways got errors when I closed the window :(

EDIT: This is how I tryed it

? ?shell1.addDisposeListener(new DisposeListener() {
 ? ?	public void widgetDisposed(DisposeEvent event) {
 ? ? ?histLbl.setText("");
 ? ?	}
 ? ?});

EDIT2: NVM, It didnt work cause I cant set a Label after the window has been disposed.:angry: me :angry:

Edited by eccofresh
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.