View Full Version : How do i catch events from a Dialog?
TheBuzzer
12 Aug 2008, 8:17 AM
How do i catch events from a Dialog?
I am wondering how do I catch a dialog button clicks such as yes or no.
I cant seem to figure it out.
Grandiosa
12 Aug 2008, 9:12 AM
I think something like this would work:
Dialog dlg = new Dialog();
dlg.setButtons(Dialog.YESNO);
Button yes = dlg.getButtonBar().getButtonById(Dialog.YES);
yes.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent be) {
....
}
});
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.