皮皮学,免费搜题
登录
搜题
【简答题】
下面是一个Applet程序,程序的功能是用鼠标点击画图。本题是通过点击鼠标后画出一个“Java”字。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。 注意:不改动程序的结构,不得增行或减行。 import java.awt.*; import java.awt.event.*; import java.applet.*; /* <applet code=SimpleHitMouse.java width=800 height=400> </applet> */ public class SimpleHitMouse implements Applet{ private java.util.Vector points=new java.util.Vector(); public void init(){ adclMouseListener(new MouseAdapter(){ public void mousePressed(MouseEvent e){ points.add(new Point (e.getX() ,e.getY())); paint ( ); } }); } public void update(Graphics g){ repaint(g); } public void paint(Graphics g){ for(int i=0;i<points.size();i++){ Point dot=(Point)points.elementAt(i); g.drawString('x',dot.x,dot.y); } } public static void main(String args[ ]){ Frame. fram=new Frame('CelayTree'); SimpleHitMouse dot=new SimpleHitMouse(); dot.init(); dot.start(); fram.add('Center',dot); fram.setSize(400,300); fram.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) {System.exit(0);} }); fram.show(); } } ex32_3.html: <html> <head> <title>A Simple Program</title> </head> <body> <applet code='SimpleHitMouse.class' width=800 height=400> </applet> </body> </html>
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】为处在两个不同地理位置的终端设备之间提供连接和路径选择的是OSI的
A.
应用层
B.
网络层
C.
表示层
D.
物理层
【单选题】为处在两个不同地理位置的终端设备之间提供连接和路径选择的是OSI模型的_______
A.
物理层
B.
表示层
C.
传输层
D.
网络层
【简答题】outgoing comment shy nearby maybe apart end fight circle criticize enemy hate 7. Will you give us your ___________ on the latest ?
【简答题】outgoing comment shy nearby maybe apart end fight circle criticize enemy hate 6. He often goes shopping in a/an ________ supermarket.
【单选题】能为处在两个不同地理位置的终端设备之间提供连接和路径选择的是OSI模型的
A.
网络层
B.
应用层
C.
传输层
D.
物理层
【单选题】能为处在两个不同地理位置的终端设备之间提供连接和路径选择的是OSI模型的
A.
网络层
B.
应用层
C.
表示层
D.
物理层
【简答题】outgoing comment shy nearby maybe apart end fight circle criticize enemy hate 1. Linda is too _____ to go to a party to meet new friends.
【单选题】如图,选择此工具需按住工具栏中的
A.
缩放工具
B.
挑选工具
C.
形状工具
D.
手绘工具
【单选题】为处在两个不同地理位置的终端设备之间提供连接和路径选择功能是在OSI模型的( )
A.
表示层
B.
物理层
C.
网络层
D.
传输层
【判断题】外部高速时钟HSE的时钟输入频率范围为2-16MHz。
A.
正确
B.
错误
相关题目: