import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class MsgDlg extends JFrame implements ActionListener {
	Calculate24 tempCal24;
	 protected MsgDlg(String strMsg,Calculate24 Cal24){
    	//super();
    	this.setTitle("提示窗口");
	   JPanel textp=new JPanel();
	   JPanel btnp=new JPanel();
	   JLabel label=new JLabel();
	   this.setLayout(new BorderLayout());
	   this.add(textp,BorderLayout.NORTH);
	   this.add(btnp,BorderLayout.SOUTH);
	  textp.add(label,BorderLayout.CENTER);
	  label.setText(strMsg);
	  this.setSize(580,100);
	  this.setLocation(400,300);
	  JButton btnOk=new JButton("确定");
	  tempCal24=Cal24;
	  btnOk.addActionListener(this);
	  btnp.add(btnOk);
	  this.toFront();
	  tempCal24.btnOk.setEnabled(false);//使确定按钮不可用
	  this.setVisible(true);//显示对话框
  }

	
	public void actionPerformed(ActionEvent e) {
		this.dispose();//隐藏对话框
		tempCal24.btnOk.setEnabled(true);//激活确定按钮
	}
	
	
	
	
	//测试区
	/*public static void main(String []args){
		new MsgDlg("欢迎再次使用");
	}*/
}
最近下载更多
xingxing1234  LV10 2023年3月22日
floweyws  LV6 2022年6月3日
leslie123456  LV4 2018年7月9日
lw19900921  LV25 2018年7月5日
wyx065747  LV67 2017年12月10日
半路出家  LV2 2014年11月13日
hello  LV7 2014年6月17日
骑着猪猪去逛街  LV32 2014年1月7日
最代码官方  LV167 2012年10月31日
yihui1229  LV13 2012年10月31日
最近浏览更多
xingxing1234  LV10 2023年3月22日
微信网友_6191697646571520  LV6 2022年11月24日
SZEPEZS  LV8 2022年6月10日
floweyws  LV6 2022年6月3日
liuqiang1314520 2020年10月16日
暂无贡献等级
675104182  LV14 2020年9月22日
hxb2000  LV1 2020年6月5日
a1677596408  LV23 2020年5月16日
lllpppwww  LV5 2020年4月1日
SIMONZSK  LV3 2019年12月16日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友