关于java中的actionlistener

2025-05-10 05:40:03
推荐回答(2个)
回答1:

下面是我的SWT中的应用:

okButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
YourDialog d = new YourDialog ();
d.open;

}
});

回答2:

同一个窗口类,不断生成实例