应该是这个setIconImage(Image image)
首先导入import javax.swing.*;
然后再程序中这样使用:
JOptionPane jop = new JOptionPane();
int i = jop.showConfirmDialog(null,"是否退出?","退出",JOptionPane.OK_CANCEL_OPTION);
if(i==0){
//你的内容
}else{
//你的内容
}
此类还有很多方法,可参考API
然后再程序中这样使用:
JOptionPane jop = new JOptionPane();
int i = jop.showConfirmDialog(null,"是否退出?","退出",JOptionPane.OK_CANCEL_OPTION);
if(i==0){
//你的内容
}else{
//你的内容
}
此类还有很多方法,可参考API
首先导入import javax.swing.*;
然后再程序中这样使用:
JOptionPane jop = new JOptionPane();
int i = jop.showConfirmDialog(null,"是否退出?","退出",JOptionPane.OK_CANCEL_OPTION);
if(i==0){
//你的内容
}else{
//你的内容
}
此类还有很多方法,可参考API
然后再程序中这样使用:
JOptionPane jop = new JOptionPane();
int i = jop.showConfirmDialog(null,"是否退出?","退出",JOptionPane.OK_CANCEL_OPTION);
if(i==0){
//你的内容
}else{
//你的内容
}
此类还有很多方法,可参考API