问题 填空题

如图所示,Q带负电荷,金属导体P由于静电感应,两端感应电荷的电性分别是:导体P的a端带______电荷,b端带______电(填“正、负”),静电平衡后P内部的场强______零(填“大于、小于、于”)

答案

当负电荷Q处在金属导体P附近时,负电荷周围存在电场,从而使得金属中的自由电子在电场力作用下向b端发生移动,导致a端的正电荷多余,b端的负电荷多余,最终导体P的a端带正电,b端带负电.

当金属导体a端带正电,b端带负电时,导体中有自a向 b 的电场.由于负电荷Q也产生电场.故只有当复合电场为0时,自由电子才停止运动.

故答案为:正;负;等于

问答题

本题的功能是通过鼠标确定两个点,然后画两点间的直线。窗口中有一个按钮“Draw line”,单击该按钮后,它就处于按下状态,然后用鼠标在窗口中单击一下,在单击的地方就会出现一个坐标圆点,用鼠标在另外一个地方单击一下又会出现另外一个圆点,并且此时在两个坐标圆点间画出一条直线,且“Draw line”处于可用状态,再单击这个按钮就可以画另外一条直线。
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class EventQueuePanel extends JPanel implements ActionListener
EventQueuePanel()
JButton button=new JButton("Draw line");
add(button);
button.addActionListener(this);

public void actionPerformed(AclionEvent evt)
Graphics g=getGraphics();
______p=getClick();
g.drawOval(p.x-2,p.y-2,4,4);
Point q=getClick();
g.drawOval(q.x-2,q.y-2,4,4);
g.drawLine(p.x,p.y,q.x,q.y);
g.dispose();

public Point getClick()
EventQueue eq=Toolkit.getDefaultToolkit().getSystemEventQueue();
while(true)
try
AWTEvent evt=eq.getNextEvent();
if(evt.getID()==MouseEvent.MOUSE PRESSED)
MouseEvent mevt=(MouseEvent)evt;
Point p=______();
Point top=getRootPane().getLoeation()______
p.x-=top.x;
p.y-=top.y;
return p;


catch(InterruptedException e)



private int y=60;

class EventQueueFrame extends JFrame
public EventQueueFrame()
setTitle("java2");
setSize(300,200);
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);

);
Container contentPane=getContentPane();
contentPane.add(new EventQueuePanel());


public class java2
public static void main(String[]args)
Frame frame=new EventQueueFrame();
frame.show();

单项选择题