public void actionPerformed(ActionEvent arg0)
{
t2.setText("点击取消或关闭");
jd.dispose();
}
});
/* //当点击"直接关闭对话框",返回值为:“点击取消或关闭”。* jd.addWindowListener(new WindowListener()
{
@Override
public void windowOpened(WindowEvent arg0) { // TODO Auto-generated method stub
}
@Override
public void windowIconified(WindowEvent arg0) { // TODO Auto-generated method stub
}
@Override
public void windowDeiconified(WindowEvent arg0) { // TODO Auto-generated method stub
}
@Override
public void windowDeactivated(WindowEvent arg0) { // TODO Auto-generated method stub
}
@Override
public void windowClosing(WindowEvent arg0) { // TODO Auto-generated method stub
}
@Override
public void windowClosed(WindowEvent arg0) { // TODO Auto-generated method stub
t2.setText("点击取消或关闭");
}
@Override
public void windowActivated(WindowEvent arg0) { // TODO Auto-generated method stub