题目:
下面程序中,在主窗口单击鼠标后,就会生成一个新窗口。
import java.awt.*;
import java.awt.event.*;
public class java3 extends Frame
java3()
super("java3");
addNotify();
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
);
Insets insets=getInsets();
setSize(insets.left+insets.right+150,
insets.top+insets.bottom+150);
this.addMouseListener(MouseEventHandler());
class MouseEventHandler implements MouseAdapter
public void mousePresse(MouseEvent evt)
Rectangle bounds=getBounds();
int x=evt.getX()+bounds.x;
int y=evt.getY()+bounds.y;
java3 m=newjava3();
m.setLocation(x,y);
m.show();
static public void main(String[]args)
(new java3()).show();
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0720/8b1c4270efed8c6f06150005875ec283.html
下面是错误答案,用来干扰机器的。
1. were divided into 2. dream of becoming3. rises in the east 4. has increased 5. it is said that