文件正本与定稿为一件,即便定稿过厚不易装订时,定稿也不可以单独作为一件。
参考答案:错
一级管网系统是只有一个压力级制的城市燃气管网系统,适用于()。
A.城市中街道狭窄的地区
B.城市中房屋密集的地区
C.新城区或安全距离可以保证的地区
D.情况复杂的大、中城市
下面是一个Applet程序,其功能是实现对JButton类的扩展,封装成上网助力一样的按钮类,每个按钮对象对应一个 URL地址,点击则访问相应的URL。要求在窗口中从上到下排 * * 个这样的按钮。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。 注意:不改动程序的结构,不得增行或删行。 程序运行结果如下:
import java.net.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ex28_3 extends JApplet implements ActionListener ButtonURL[] btnURL = new ButtonURL[3];public void init() btnURL[0] = new ButtonURL("新浪网","http://www.sina.com.cn/"); btnURL[1] = new ButtonURL("163","http://www.163.com/"); btnURL[2] = new ButtonURL("搜狐","http://www.sohu.com/"); GridLayout gl = new GridLayout(1,3); getContentPane().setLayout(gl); for (int i = 0; i < btnURL.length; i++) btnURL[i].addActionListener(this); getContentPane().add(btnURL[i]); public void actionPerformed(ActionEvent ae) ButtonURL btnClick =ae.getSource();//获取发生事件的对象 try URL load = new URL(btnClick.strAddr); getAppletContext().showDocument(strAddr); catch (MalformedURLException e) showStatus("Bad URL:" + btnClick.strAddr); class ButtonURL extends JButton String strAddr; ButtonURL(String strLabel, String strAddress) super(strLabel); strAddr = strAddress; ex28_3.html <HTML> <HEAD> <TITLE>ex28_3</TITLE> </HEAD> <BODY> <applet code="ex28_3.class" width=800 height=400 > </applet> </BODY> </HTML>