还剩36页未读,继续阅读
本资源只提供10页预览,全部文档请下载后查看!喜欢就下载吧,查找使用更方便
文本内容:
课程设计一火灾报警系统nClasSeforName sunjdbCeOdbceJdbcOdbcDrinver;11con=Dri verManagengetConnectionj dbc:odH MHHbc:fufangbiao/\;sql=concreateStatement;ResultSet Hselect报警点信编号from
八、catchClassNotFoundException e3{}try,n n,n=+tl.getText+;if!rsnext{这个报11JOptionPaneeShowMessageDialogfthis,警者不存在,请重新输入!!);nntlsetText;else{报警点nsql.executeUpdate deletefrom信息表报警点编茸,n n,nwhere=+tlegetText+;删除1JO^ptionPane.showMessageDialogthis,1nntlsetText;catchException eln nJOptionPanesho wMessageDialogthis,;ifegetSource==b2supersetVisiblefalse;
5.添加界面class tianjiaextends Frameimplements ActionListenerBox bo,bol,bo2;Button bl,b2;JTextFieldtianjia添加火灾报警点”;super-tl=newJTextField15;t2=new JTextField15;t3=new JTextField15;t4=new JTextField15;t5=new JTextField15;t6=new JTextField15;逸定;bl=new Buttonb2=new Button1返回j;bol=Box.createVerticalBox;boleaddBoXeCreateVerticalStrut40;报警点编号”;bol.addnew Label警点噬单必报报出名点獴报警点报详松点警一警报点地阖隶警打boladdBoXeCreateVerticalStrut40;bo2=Box.createVerticalBox;bo
2.addBox.createVerticalStrut40;bo
2.addtl;bo
2.addBox.createVerticalStrut40;bo
2.add«2;bo
2.addBox.createVerticalStrut40;bo
2.addt3;bo
2.addBox.createVerticalStrut40;bo
2.addt4;bo
2.addBox.createVerticalStrut40;bo
2.addt5;bo
2.addBox.createVerticalStrut40;bo
2.addt6;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;ooooooooooobbbbbbbbbbbaaaaaaaaaaaxlxllllllllnBnBnBnBnBbeDoevoevoevoevODxrL2rL2rL2rL2rcealealealealeababababactctctctct KevMevlevKevKevfrtC43cleaCJAJrtrtrtrticalealeaIsIsIsicatruxtruYtruIsIs.trutruw40|14zK94040n\!/\!/nW••9bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayoutO;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,350,500;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blConnection con;Statement sql;ResultSet rs;n n n niftl.getText.equals||t
2.getText.equals|1f n1n|t
3.getText.equals||t
4.getText.equals|1n1f1|t
5.getText.equals*||t
6.getText.equals f请输入完f1JOptionPane.showMessageDialogthis.整的报警点信息”;nn nnnntl.setText;t2eSetText;t3eSetText;nn Hnnnt
4.setText;t5eSetText;t
6.setText;return;nClasseforName sunJdbCeOdbCeJdbcOdbcDriver;catchClassNotFoundException e3{}try11con=Dri verManagengetConnectionj dbc:odH M,,nbc:fufangbiao//;sql=con.createStatement;nResultSet rt=sqLexecuteQuery select*报警点信息要靠拿米编号from where,n=+tl.getTextifrt.next有这个(JOptionPane.showMessageDialog thisJ报誉点编号,请重新输刀!!”);tl.setTennxt;nnt2setText;nnt3setText;nnt4setText;nnt5setText;nnt6setText;else{报警点信息表HsqLexecuteUpdate insertinto111n fHvalues+t1egetTextO+\+t
2.getText+,+t3getText+;;nt nnf Hn,nt4egetText++t
5.getText++t
6.getText+;添力口1^JOptionPane.showMessageDialog^his/nntleSetText;nnt2eSetText;nnt3setText;nnt4setText;IMft5eSetText;nnt
6.setText;catch Exceptione3{e3eprintStackTrace;ifeegetSource==b2supersetVisiblefalse;
6.模拟界面class MoNiextends Frame implementsActionListenerBox bo,bol,bo2;Button bl,b2;JTextField tl;File musicFile;URI uri;URL url;AudioClip clip;n nString[]s={lau J;MoNi模拟火灾报警”;supertl=new JTextField15:Hbl=new Buttonb2=new Button]bol=Box.createVerticalBox;bol.addBox.createVerticalStrut40;报警点编号”;bol.addnew Labelbol.addBox.createVerticalStrut40;bol.addbl;bo2=Box.createVerticalBox;bo
2.addBox.createVerticalStrut40;bo
2.addtl;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayoutO;b
1.add ActionListenerthis;b
2.addActionListenerthis;setBounds00,350,200;9setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blConnection con;Statement sql;ResultSet rs;nniftlegetTextequals请输入报11JQptionPane.showMessageDialogthis9誉点编号;”nntl.setText;return;nClasSeforName sunejdbCeOdbcJdbcOdbcDriver;catchClassNotFoundException e3{}try11con=Dri verManagengetConnectionj dbc:odn Mnnbc:fufangbiao/\;报ResultSet ra=sqLexecuteQueryCf nselect警点信息裳漫番看编号where*from、八sql=coneCreateStatement;Mf IMn=+tl.getText+;if!ranext{这个报11JOptionPaneshowMessageDialogthis,警者不存在,请重新输入nntlesetText;else{intxl=Integer.parseIntra.getString
5.trim;intx2=Integer.parseIntra.getString
6.trim;A frame=new Axl,x2;frame.setDefaultCloseOperationJFrame.EXIT_ON_CLOSE;frame.setSize600,450;frame.setLocationRelativeTo null;frame.setVisibletrue;1System.out.println*yes;musicFile=new Files
[0];uri=musicFile.toURI;try{url=uri.toURL;}catchExceptionexp{}clip=Applet.newAudioClipurl;clip.playO;catchException el{11J OptionPaneshowMessageDialogthis,asdifeegetSource==b2super.setVisiblefalse;clipeStopO;U・调试分析
1.开始不知道如何实现在地图上的动态显示报警图片,后来通过查资料知道!了如下实现
2.在运行时遇到了程序无法显示图片的情况,总是抛出异常
五、用户手册1*本程序的运行环境为Windows操作系统,eclipse软件
2.点击进入系统后,会出现添加报警点,删除报警点,火灾报警模拟等功能
3.如果用户想要退出程序,直接点击运行界面的右上角上的关闭按钮即可,操作很方便
六、测试数据.开始界面1目录
一、需求分析3
二、概要设计3
三、详细设计3
四、调试分析15
五、用户手册15
六、测试数据15
七、附录20国主界面欢迎进入火灾报警模拟系统H弄天系统退出系统.点击进入后2屯功能选择界面添加火灾报警点删除火灾报警点火灾报警模拟退出.点击添加按钮3画添加火灾报警点报警点编目报警点名称报警点详细地址报警点隶属单位报警点X坐标报警点Y坐标返回确定.点击删除按钮4报警点编号确定返回.点击模拟按5钮.模拟的界面6
七、附录源程序文件清单
1.Main.java ZhuJieMian.javaGongNengJieMian.java TianJian.java ShanChu.javaMoNi.java A.Java DBConenct.java源程序
2.〃文件代码如下Main.java火灾;packagepublic classMain{public staticvoid mainString[]args{new ZhuJieMian;}〃文件代码如下ZhuJieMian.java}火灾;packageimport ja va.a wt.Button;import java.awt.Frame;import java.awt.event.ActionEvent;import java.awtevent.ActionListener;import java.awt.*;import java.awt.event.*;import javax.swing.^;import javax.swing,border.*;public classZhuJieMian extends Frame implementsActionListener*/private staticfinal longserialVersionUID=Button bl,b2;Label11;Box bo,bol;Panel p,pl;ZhuJieMian(主界面);super,进入系统);bl=new Button,退出系统旺;b2=new Button(欢迎逆入火灾报警模拟ll=new Label系统”);p=new Panel;pl=new Panel;ll.setAlignmentLabel.CENTER;ll.setFontnew bol=BoXeCreateVerticalBox;f11Font SerifJont PL AIN,40;ll.setForegroundColor.red;bl.setForegroundColor.red;b
2.setF oregroundColor.red;blsetFontnewFontC**SerifFont.PL AIN,20;b2setFontnew1f11Font Serif,Font PLAIN,20;boladdBoXeCreateVerticalStrut50;bol.addll;bol.addBox.createVerticalStrut10;pleaddbol;bo=BoxcreateVerticalBox;bo.addbl;bo.addBox.createVerticalStrut20;bo.addb2;bo.addBox.createVerticalStrut50;peaddbo;addpl,BorderLayout.NORTH;addp,BorderLayout.SOUTH;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,600,400;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==bl newGongNengJieMian;ife.getSource==b2super.setVisiblefalse;〃文件代码如下GongNengJieMian.java火灾;packageimport ja vaa wtF rame;import java.awt.event.ActionE vent;import java.awt.event.ActionListener;import java.awtevent.WindowAdapter;import javaeawLeveiiLWindowEvent;import javaawt*;import java.awt.event.^;import javaXeSwing^;import javax.swing,border.*;class GongNengJieMianextends Frame implementsActionListenerButton bl,b2,b3,b4;Box b;GongNengJieMian功能选择界面”;{supernbl=new Button添加火灾报警点”;nb2=new Button删除火灾报警点”;,b3=new Button火灾报警模退拟”;出nb4=new Button;b=Box.createVerticalBox;b.addBox.createVerticalStrut40;b.addbl;b.addBox.createVerticalStrut40;b.addb2;b.addBox.createVerticalStrut40;b.addb3;b.addBox.createVerticalStrut40;b.addb4;addb;bl.addActionListenerthis;b
2.addActionListenerthis;b
3.addActionListenerthis;b
4.addActionListenerthis;setLayoutnew FlowLayout;setBounds0,0,300400;setVisibletrue;validate;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{SystenieexitO;}};public voidactionPerformedActionEvent eife.getSource==blnew tianjia;ife.getSource==b2new ShanChu;ife.getSource==b3{new MoNi;ife.getSource==b4super.setVisiblefalse;〃文件代码如下TianJian.java火灾;packageimport ja va.awt.F rame;import java.awt.event.ActionE vent;import java.awt.event.ActionListener;import java.awt.event.WindowAdapter;import java.awt.event.WindowE vent;import javax.swing.^;import java.awt.*;import java.awtevent.^;import java.sql.^;class tianjiaextends Frameimplements ActionListenerBox bo,bol,bo2;Button bl,b2;JTextField tl,t2,t3,t4,t5,t6;tianjia,添加火灾报警点”;supertl=new JTextField15;t2=new JTextField15;t3=new JTextField15;t4=new JTextField15;t5=new JTextField15;t6=new JTextField£15;确定;,返回bl=new Buttonb2=new Buttonbol=Box.createVerticalBox;boleaddBoXeCreateVerticalStrut40;bol.addnew报警点编号”;LabelboleaddBoXeCreateVerticalStrut40;bol.addnew报警点名称”;LabelboleaddBoxecreateVerticalStrut40;「报警点详细地址”;boleaddnew LabelboleaddBoxcreateVerticalStrut40:报警点隶属单位”;Hboleaddnew LabelboleaddBoXeCreateVerticalStrut40;bol.addnew报警点坐标Label Xj;boladdBoXeCreateVerticalStrut40;bol.addnew”报警点坐—Labei Ybol.addBox.createVerticalStrut40;boleaddbl;bo2=Box.createVerticalBox;bo2eaddBoXeCreateVerticalStrut40;bo
2.addtl;bo2eaddBoxcreateVerticalStrut40;bo
2.addt2;bo2addBoxcreateVerticalStrut40;bo
2.addt3;bo2addBoxcreateVerticalStrut40;bo
2.addt4;bo
2.addBox.createVerticalStrut40;bo
2.addt5;bo
2.addBox.createVerticalStrut40;bo
2.addt6;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayout;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,350,500;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eifeegetSource==blConnection con;Statement sql;ResultSet rs;nniftlegetTexteequals||t2egetText.equals
一、需求分析编写一个模拟火灾报警的系统,要求能够做到完成报警编号的录入,删除,修改,查询,删除功能,在某个地点按下报警,会显示出该地点的报警,并有报警声音程序执行的命令
1.进入系统的登录界面
2.进入系统后的界面选择
3.实现报警
二、概要设计
1.功能模块图
2.构程序中所使用的数据结构的介绍clas sGongNengJieMian extendsFrameimplements ActionListener{//实现接录的主界面//数据public classDBConnect源美
3.本程序模块结构extendsclass GongNengJieMianFrameimplements ActionListener//主界面程序模块nI|t
3.getTextequals||t
4.getTextequals|11nnn|t5egetTexteequals||t
6.getText.equals请输入完整的1fJOptionPane.showMessageDialogthis,报警点信息”;nt tlsetTextfM;t2eSetTextIMt
3.setTextfM t4eSetTexttM;t5setTextn,t
6.setTextreturn;try;nClasSeforName sunjdbCeOd;bcJdbcOdbcDri ver;catchClassNotFoundException e3{};;11con=Dri verManagengetConnectionCj dbc:odn Mnnbc:fufangbiao/\;sql=concreateStatement;ResultSet报警点信息簪1eQueiwC select*fromrt=sqLexecute点编号表报广=”+tLgetTextwhereifrtnext有这个报善点11JOptionPane.showMessageDialogfthis,编号,请重新输刀!;nntlesetText;nnt2eSetText;nnt3eSetText;nnt4eSetText;nnt5eSetText;nnt6setText;else{报警点信息表H1sqLexecuteUpdate insertinto valuesnn fn+
11.getText+\+;nf nt2egetText++t3getText+;nt nt4egetText++t
5.getText+,+n,nt
6.getText+;添力口1JO^ptionPane.showMessageDialogthis/nntlsetText;nnt2eSetText;nnt3eSetText;nnt4setText;HHt5setText;nnt
6.setText;catch Exceptione3{e3printStackTrace;ifegetSource==b2supensetVisiblefalse;〃文件代码如下ShanChuJava火灾;packageimport java.awt.Frame;import java.awt.event.ActionE vent;import java.awt.event.ActionListener;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;import javax.swing.^;import java.awt.^;import java.awt.event.^;import java.sql.^;class ShanChuextends Frameimplements ActionListenerBoxbo bolbo2;99Button bl,b2;JTextField tl;ShanChuQ(删除火灾报警点”);pertl=new JTextField15;逸定;bl=new Button返回b2=new Buttonj;bol=Box.createVerticalBox;boleaddBoXeCreateVerticalStrut40;bol.addnew报警点编号”;LabelboleaddBoxecreateVerticalStrut40;boladdbl;bo2=BoxcreateVerticalBox;bo2eaddBox.createVerticalStrut40;bo2addtl;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayoutO;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,350,200;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eifeegetSource==blConnection con;Statement sql;H HiftlegetTexteequals请输11JQptionPaneeshowMessageDialogthis,nntleSetText;return;trynClasSeforName sun.jdbCeOdbCeJdbcOdbcDri ver;catchClassNotFoundException e3{}ncon=DriverManagengetConnection jdbc:odn,n,nbc:fufangbiao//;sql=coneCreateStatement;ResultSet报警点信息表1rs=sqLexecuteQueiwC select*from where报警点编号,+,;=+tLgetText if!rs.next{这个报警者(f1JOptionPaneeshowMessageDialog this,不存在,请重新输刀!!”);nntlesetText;else{11sqLexecuteUpdate deletefrom报警点信息表报警点编号,nn,nwhere=+tl.getText+;成甲删除ytioPane.showMessageDialogthisJnntl.setText;catchException eln11J OptionPaneshowMessageDialogthis,;ifeegetSource==b2supensetVisiblefalse;〃文件代码如下MoNiJava火灾;packageimport java.applet.Applet;import java.applet.AudioClip;import java.awt.Button;import java.awt.FlowLayout;import java.awt.Frame;import java.awt.Label;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.WindowAdapter;import java.awt.event.WindowE vent;import javax.swing.^;import java.awt.^;import java.awt.event.^;import java.io.File;import java.net.URI;import java.net.URL;import java.sql.^;class MoNiextends Frame implementsActionListenerBox bo,bol,bo2;Button bl,b2;JTextField tl;File musicFile;URI uri;URL url;AudioClip clip;n nString[]s={l.au J;MoNi模拟火灾报警”;{supertl=new JTextField15;确定;bl=new ButtonC,返回b2=new Buttonbol=Box.createVerticalBox;bol.addBox.createVerticalStrut40;bol.addnew报警点编号”;Labelbol.addBox.createVerticalStrut40;bol.addbl;bo2=Box.createVerticalBox;bo
2.addBox.createVerticalStrut40;bo
2.addtl;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayout;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,350,200;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blConnection con;Statement sql;ResultSet rs;n niftl.getText.equals请输入报誉点1JOptionPane.showMessageDialogthis,1编号;”nntl.setText;return;nClasSeforName sunJdbCeOdbCeJdbcOdbcDriver;catchClassNotFoundException e3{}tryHcon=DriverManagengetConnection jdbc:odM,n,nbc:fufangbiao//;sql=coiieCreateStatement;ResultSet报警点信息表1ra=sqLexecuteQueryC select*from where报警点编号+,;=+tLgetTextjif!ra.next{这个报警者不f1JOptionPane.showMessageDialogthis,存在,请重新输nntl.setText;else{intxl=IntegereparseIntraegetString5etrim;intx2=Integer.parseIntra.getString
6.trim;A frame=new Axl,x2;framesetDefaultCloseOperationJFrameEXIT_ON_CLOSE;frame.setSize600,450;framesetLocationRelativeTo null;framesetVisibletrue;11Sy stemeOutprintlnyes;musicFile=new Files[O];uri=musicFileetoURI;try{url=uri.toURL;}catchException exp{}clip=Applet.newAudioClipurl;clip.playO;catchException el{1f nJOptionPaneesho wMessageDialogthis,asd ifeegetSource==b2supensetVisiblefalse;clipeStopO;〃文件代码如下Aejava火灾;packageimport javaeawteveiiL*;class tianjiaextends Frameimplements ActionListener{〃添加报警点的程序模块class ShanChuextends FrameimplementsActionListener〃删除报警点的程序模块class MoNiextendsFrameimplementsActionListener//模拟报警的程序模块//地图的现public classA extendsJFrame{实的程序模块}各模块之间的调用关系如下:主程序模块数据[更新模块报警模拟模块三.详细设计各功能模块的实现如下
1.主函数public classMain{import javax.swing.^;import java.awt.^;public classA extendsJFrame{JScrollPane scrollPane;Imageicon icon,iconl;Image image;int xl,yl;public Aintx,int y{try xl=x;yi=y;11nicon=new Imagelcona.jpg;n niconl=new Imagelcon
1.jpg;JPanel panel=new JPanel{protected voidpaintComponentGraphicsg{g.drawlmageicon.getlmage,0,0,null;g.drawlmageiconl.getlmage,xl,yl,null;supenpaintComponentg;paneLsetOpaque false;scrollPane=new JScrollPanepanel;getContentPaneadd scrollPane;catchExceptionexception exceptionprintStackTrace;〃//public staticvoid mainString[]args{newA123,123;〃文件代码如下DBConenctj ava火灾;package//import javaeSqLConnection;import java.sql.DriverManager;public classDBConnect{public staticConnection getConnthrowsExceptionn nClasSeforNamesunjdbceodbCeJdbcOdbcDri ver;returnnDriverManager.getConnection jdbc:odbc:fufapublic staticvoid mainString[]args{//调用主界面new ZhuJieMian;类}}
2.主界面public classZhuJieMian extendsFrameimplementsActionListener;〃设private staticfinal longserialVersionUID=IL置容器的大小Button bl,b2;Label11;Boxbobol;9Panel p,pl;ZhuJieMian主界面”;super进入系统;bl=new Button退出系统b2=new Button「欢迎进入火灾报警模拟系ll=new Label统”;p=new Panel;pl=new Panel;ll.setAlignmentLabel.CENTER;
1.5setFontnewFont Serif,Font PLAIN,40;
1.6setF oregroundColor.red;bl.setForegroundColor.red;b
2.setF oregroundColor.red;bl.setFontiiew1Font Serif\Font.PLAIN,20;b
2.setFontnewFont SerifFont.PLAIN,20;bol=Box.createVerticalBox;bol.addBox.createVerticalStrut50;bol.addll;bol.addBox.createVerticalStrut10;pl.addbol;bo=Box.createVerticalBox;bo.addbl;bo.addBox.createVerticalStrut20;bo.addb2;bo.addBox.createVerticalStrut50;p.addbo;addpl,BorderLayout.NORTH;addp,BorderLayout.SOUTH;bl.addActionListenerthis;b
2.addActionListenerthis;setBounds0,0,600,400;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blnew GongNengJieMian;ife.getSource==b2super.setVisiblefalse;
3.功能界面class GongNengJieMianextendsFrameimplementsActionListener Button bl,b2,b3,b4;Boxb;GongNengJieMian功能选择界面”;{supernbl=new Button添加火灾报警点;,b2=new Button删除火灾报警点;,b3=new Button火灾报警模拟退;出,b4=new Buttonb=Box.createVerticalBox;b.addBox.createVerticalStrut40;b.addbl;b.addBox.createVerticalStrut40;b.addb2;b.addBox.createVerticalStrut40;b.addb3;b.addBox.createVerticalStrut40;b.addb4;addb;bl.addActionListenerthis;b
2.addActionListenerthis;b
3.addActionListenerthis;b
4.addActionListenerthis;setLayoutnew FlowLayout;setBounds0,0,300,400;setVisibletrue;validate;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blnew tianjia;ife.getSource==b2new ShanChuO;ife.getSource==b3{new MoNi;ifegetSource==b4supensetVisiblefalse;
4.删除界面class ShanChuextendsFrameimplementsActionListenerBoxbo,bol,bo2;Buttonbl,b2;JTextField tl;ShanChu删除火灾报警点”;supertl=new JTextField15;遮定;bl=new Button,返回b2=new Button^j;bol=Box.createVerticalBox;boleaddBoXeCreateVerticalStrut40;报警点编号”;bol.addnew Label“boleaddBoxecreateVerticalStrut40;bol.addbl;bo2=Box.createVerticalBox;bo2eaddBoXeCreateVerticalStrut40;bo2addtl;bo
2.addBox.createVerticalStrut40;bo
2.addb2;bo=Box.createHorizontalBox;bo.addbol;bo.addBox.createHorizontalStrut20;bo.addbo2;bo.addBox.createHorizontalStrut20;addbo;setLayoutnew FlowLayoutO;b
1.add ActionListenerthis;b
2.addActionListenerthis;setBounds0,0,350200;setVisibletrue;this.addWindowListenernewWindowAdapter{public voidwindowClosingWindowEvente{System.exitO;}};public voidactionPerformedActionEvent eife.getSource==blConnection con;Statement sql;nniftl.getText.equals请输如要MJOptionPane.showMessageDialogthis,而除的报警点编号”;fMftleSetText;return;try。