Bootstrap

java图形界面实验总结,【兔年惊喜】Java语言程序设计 实验八 第八章 Swing图形用户界面程序设计实验任务(一)...

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

;